/* ===== Product Page Checkout & Pricing Styles ===== */

.plans-pricing-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Pricing Summary Card */
.pricing-summary-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 15, 31, 0.7);
    border: 1px solid rgba(0, 255, 224, 0.2);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(12px);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.pricing-summary-card strong {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.pricing-summary-card .price-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 224, 0.3);
}

.pricing-summary-card .price-display span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Accessible Billing Toggle */
.billing-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.billing-toggle label {
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.toggle-btn {
    position: relative;
    width: 60px;
    height: 30px;
    background: rgba(0, 255, 224, 0.1);
    border: 1px solid rgba(0, 255, 224, 0.3);
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
    padding: 0;
}

.toggle-btn::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 4px;
    width: 22px;
    height: 22px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 255, 224, 0.5);
    transition: transform 0.3s;
}

.toggle-btn[aria-checked="true"]::after {
    transform: translateX(28px);
}

.toggle-btn:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 4px;
}

/* Pricing Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.p-card {
    background: rgba(10, 15, 31, 0.65);
    border: 1px solid rgba(0, 255, 224, 0.12);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
}

.p-card:hover, .p-card.selected {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 40px rgba(0, 255, 224, 0.1);
}

.p-card.featured {
    border: 2px solid var(--accent-cyan);
    background: linear-gradient(135deg, rgba(10, 15, 31, 0.8) 0%, rgba(0, 255, 224, 0.05) 100%);
    box-shadow: 0 0 30px rgba(0, 255, 224, 0.1);
}

.p-card.featured::before {
    content: attr(data-badge);
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-cyan);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.p-card .tier-name {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.p-card .card-benefit {
    font-size: 0.88rem;
    color: var(--text-muted);
    min-height: 2.8em;
    margin-bottom: 1.5rem;
}

.p-card .tier-price {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1rem 0 0.5rem;
}

.p-card .tier-price span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.p-card .tier-period {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.p-card .tier-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 2rem;
    text-align: left;
    flex: 1;
}

.p-card .tier-features li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.p-card .tier-features li::before {
    content: '✓';
    color: var(--accent-cyan);
    font-weight: 700;
}

.tier-cta {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    text-align: center;
    border: none;
    font-family: var(--font-primary);
}

.tier-cta-primary {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.tier-cta-primary:hover {
    box-shadow: 0 0 25px rgba(0, 255, 224, 0.5);
    background: #33FFE9;
}

.tier-cta-secondary {
    background: transparent;
    color: var(--accent-cyan);
    border: 2px solid rgba(0, 255, 224, 0.4);
}

.tier-cta-secondary:hover {
    background: rgba(0, 255, 224, 0.08);
    border-color: var(--accent-cyan);
}

/* Configuration Drawer */
.drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    height: 100vh;
    background: rgba(10, 15, 31, 0.98);
    border-left: 1px solid rgba(0, 255, 224, 0.2);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 3rem 2rem 2rem;
    display: flex;
    flex-direction: column;
}

.drawer.open {
    right: 0;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1999;
    display: none;
}

.drawer-overlay.visible {
    display: block;
}

.drawer h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
}

.close-drawer-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-drawer-btn:hover {
    color: var(--accent-cyan);
}

#drawer-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

#selected-plan-summary {
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#selected-plan-summary h4 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

#selected-plan-summary p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

.addons-header {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.addons-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.addon-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    transition: border-color 0.2s;
}

.addon-row:hover {
    border-color: rgba(0, 255, 224, 0.25);
}

.addon-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
    margin-top: 3px;
}

.addon-info {
    flex: 1;
}

.addon-info label {
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.addon-info label span {
    color: var(--accent-cyan);
}

.addon-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.25rem 0;
}

.addon-usecase {
    font-size: 0.75rem;
    color: #FF6A00;
    font-style: italic;
    margin: 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: auto;
    margin-bottom: 1.5rem;
}

.total-row span {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.total-row strong {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Mobile Sticky Checkout Bar */
.sticky-mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 15, 31, 0.95);
    border-top: 1px solid rgba(0, 255, 224, 0.25);
    backdrop-filter: blur(16px);
    padding: 1rem 2rem;
    display: none;
    justify-content: space-between;
    align-items: center;
    z-index: 1800;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
}

.sticky-mobile-cta .mobile-config-summary {
    display: flex;
    flex-direction: column;
}

.sticky-mobile-cta .mobile-config-summary span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sticky-mobile-cta .mobile-config-summary strong {
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

.sticky-mobile-cta .btn {
    width: auto;
    padding: 0.75rem 2rem;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .plans-pricing-section {
        padding: 2rem 1rem 6rem;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .pricing-summary-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }
    .drawer {
        width: 100%;
        right: -100%;
    }
    .drawer.open {
        right: 0;
    }
    .sticky-mobile-cta.active {
        display: flex;
    }
}
