/* =====================================================================
   PRICING / FAQ / CONTACT STYLES
   Scoped styles for index.html.tmpl only (the landing page's pricing
   section, FAQ, and contact banner).
   Loaded via <link> in index.html.tmpl alongside style.css.
   ===================================================================== */

/* --- Pricing Section Styles --- */
.pricing-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4.5rem 1.75rem 3rem;
    scroll-margin-top: 120px; /* Account for sticky header + breathing room */
}

.pricing-header {
    text-align: center;
    margin-bottom: 1.7rem;
}

.pricing-header h1 {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 0.65rem;
    color: var(--text-color);
    font-weight: 800;
}

.pricing-header p {
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--muted-text-color);
    max-width: 570px;
    margin: 0 auto;
}

.promo-banner {
    display: inline-block;
    background: var(--accent-color);
    color: var(--accent-text-color);
    border: 0;
    padding: 0.42rem 0.85rem 0.42rem 1.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0;
}

.promo-banner::before {
    content: "";
    position: absolute;
    left: 0.74rem;
    top: 50%;
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: var(--accent-text-color);
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.25);
    transform: translateY(-50%);
}

.pricing-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.95rem;
    margin: 2rem auto 2.9rem;
}

.billing-toggle {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--detail-bg);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
}

.billing-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.billing-toggle strong {
    color: var(--accent-text-color);
    background: #cbd5e1;
    border-radius: 999px;
    padding: 0.12rem 0.42rem;
    font-size: 0.74rem;
    font-weight: 700;
}

.billing-toggle > span {
    border-radius: 999px;
    padding: 0.48rem 0.85rem;
    transition: background var(--transition-speed), box-shadow var(--transition-speed), color var(--transition-speed);
}

.billing-toggle > span:first-child {
    background: var(--card-bg);
}

.billing-toggle.yearly > span:first-child {
    background: transparent;
    box-shadow: none;
}

.billing-toggle.yearly > span:last-child {
    background: var(--card-bg);
}

.promo-code-section {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.promo-code-label {
    display: none;
}

.promo-code-box {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: transparent;
    border: 1px dashed var(--accent-color);
    border-radius: 8px;
    padding: 0.52rem 0.72rem;
    font-family: 'Courier New', monospace;
}

.promo-code {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0;
}

.promo-code-copy {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    transition: color var(--transition-speed), transform var(--transition-speed);
    border-radius: 6px;
    width: 1.35rem;
    height: 1.35rem;
}

.promo-code-copy:hover {
    color: var(--accent-hover);
    transform: scale(1.1);
}

.promo-code-copy:active {
    transform: scale(0.95);
}

.promo-code-copy svg {
    display: block;
}

.toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    background: #dbe4ef;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition-speed);
}

.toggle-switch:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.toggle-switch.active {
    background: var(--accent-color);
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--card-bg);
    border-radius: 50%;
    transition: transform var(--transition-speed);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(18px);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.3rem;
    margin-top: 0;
    max-width: 1220px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    align-items: stretch;
}

.plan-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 1.85rem 1.85rem;
    text-align: left;
    position: relative;
    overflow: visible;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
    box-shadow: var(--card-shadow);
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 32rem;
}

.plan-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 14px 28px -24px rgba(15, 23, 42, 0.4), var(--card-shadow);
}

/* On touch devices (no hover), avoid hover-triggered first-tap behavior */
@media (hover: none) and (pointer: coarse) {
    .plan-card:hover {
        transform: none;
        box-shadow: var(--card-shadow);
    }
}

.plan-card.featured {
    border-color: var(--accent-color);
    border-width: 2px;
    box-shadow: none;
}

.plan-card.featured::before {
    content: none;
}

.plan-card.current {
    border-color: var(--border-color);
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.plan-badge {
    position: absolute;
    top: -0.9rem;
    right: 2rem;
    padding: 0.45rem 0.82rem;
    border-radius: 7px;
    font-size: 0.76rem;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    box-shadow: none;
}

.current-badge {
    background: var(--card-bg);
    color: #16a34a;
    border: 2px solid #16a34a;
}

.popular-badge {
    background: var(--accent-color);
    color: var(--accent-text-color);
    border: 1px solid var(--accent-color);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    white-space: nowrap;
}

.plan-card-header {
    min-height: 4.55rem;
}

.plan-name {
    font-size: 1.45rem;
    line-height: 1.25;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--text-color);
}

.plan-description {
    color: var(--muted-text-color);
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.45;
}

.plan-price {
    margin: 1.25rem 0 1rem;
    padding: 0 0 1rem;
    border-top: 0;
    border-bottom: 1px solid var(--border-color);
}

.price-original {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 1.55rem;
    margin-top: 0.35rem;
    margin-bottom: 0;
}

.original-amount {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted-text-color);
    text-decoration: line-through;
}

.discount-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    background: #fef3c7;
    color: #92400e;
    padding: 0.18rem 0.4rem;
    font-size: 0.8rem;
    line-height: 1;
    font-weight: 800;
}

.price-amount {
    font-size: 3.25rem;
    line-height: 1;
    font-weight: 800;
    color: var(--text-color);
}

.price-period {
    color: var(--muted-text-color);
    font-size: 0.95rem;
    font-weight: 600;
}

.plan-usage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 0.95rem;
}

.plan-usage > div {
    min-width: 0;
}

.usage-value,
.usage-label {
    display: block;
}

.usage-value {
    color: var(--text-color);
    font-size: 0.98rem;
    line-height: 1.2;
    font-weight: 800;
}

.usage-label {
    color: var(--muted-text-color);
    font-size: 0.76rem;
    line-height: 1.35;
}

.yearly-savings {
    background: var(--accent-color);
    color: var(--accent-text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: inline-block;
    opacity: 0.9;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 1.1rem 0 1rem;
    text-align: left;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.34rem 0;
    color: var(--text-color);
    line-height: 1.35;
    font-size: 0.95rem;
}

.plan-features li::before {
    content: "✓";
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin-top: 0.08rem;
    border-radius: 50%;
    background: var(--success-bg-color);
    color: var(--success-text-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: bold;
}

.included-models {
    margin-bottom: 1.05rem;
}

.models-heading {
    color: var(--muted-text-color);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.model-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.model-tag {
    background-color: var(--detail-bg);
    color: var(--text-color);
    padding: 0.28rem 0.46rem;
    border-radius: 7px;
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 700;
    border: 0;
    white-space: nowrap;
    transition: all var(--transition-speed) ease;
}

.model-tag:hover {
    background-color: var(--accent-color);
    color: var(--accent-text-color);
    border-color: var(--accent-color);
}

/* Dark mode adjustments for model tags */
html[data-theme='dark'] .model-tag {
    background-color: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

html[data-theme='dark'] .model-tag:hover {
    background-color: var(--accent-color);
    color: var(--accent-text-color);
    border-color: var(--accent-color);
}

.plan-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.plan-button {
    width: 100%;
    padding: 0.86rem;
    border: none;
    border-radius: 9px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-speed);
    margin-top: auto;
    font-family: var(--font-family-sans-serif);
    touch-action: manipulation; /* Fix mobile tap delay */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    text-align: center;
    line-height: 1.25;
    text-decoration: none;
}

/* Primary CTA colors come from .btn .btn--primary (see BUTTON SYSTEM).
   .plan-button keeps only the pricing-card structure + the .current state.
   (.plan-button.secondary removed — it was unused.) */

.plan-button.current {
    background: var(--detail-bg);
    color: var(--muted-text-color);
    border: 0;
    cursor: default;
}

.plan-button:disabled {
    opacity: 1;
    cursor: not-allowed;
}


.pricing-note {
    color: var(--muted-text-color);
    text-align: center;
    margin: 2rem 0 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.current-subscription-info {
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background-color: var(--success-bg-color);
    border: 1px solid var(--success-border-color);
    border-radius: 8px;
    color: var(--text-color);
}

.current-subscription-info p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.current-subscription-info strong {
    color: var(--text-color);
}

/* Mobile responsiveness for pricing section */
@media (max-width: 768px) {
    .pricing-container {
        padding: 3rem 1rem;
    }
    
    .pricing-header h1 {
        font-size: 1.8rem;
    }
    
    .promo-banner {
        font-size: 0.72rem;
        padding: 0.42rem 0.7rem;
    }

    .pricing-controls {
        align-items: stretch;
        flex-direction: column;
        max-width: 22rem;
        margin: 1.5rem auto 1.75rem;
    }
    
    .promo-code-section {
        justify-content: space-between;
        width: 100%;
    }
    
    .promo-code-box {
        flex: 1;
        justify-content: space-between;
        min-width: 0;
    }
    
    .promo-code {
        font-size: 0.88rem;
    }
    
    .promo-code-copy {
        padding: 0.2rem;
    }
    
    .promo-code-copy svg {
        width: 14px;
        height: 14px;
    }
    
    .pricing-header p {
        font-size: 0.95rem;
    }
    
    .billing-toggle {
        justify-content: space-between;
        gap: 0.65rem;
        text-align: left;
        font-size: 0.86rem;
        width: 100%;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 0;
        max-width: 24rem;
    }
    
    .plan-card {
        padding: 1.2rem;
        min-height: auto;
        margin: 0;
    }

    .plan-card.featured::before {
        right: 1.2rem;
        left: 1.2rem;
    }

    .plan-card-header {
        min-height: 0;
    }
    
    .plan-name {
        font-size: 1.05rem;
    }
    
    .price-amount {
        font-size: 2.1rem;
    }

    .plan-usage {
        gap: 0.5rem;
    }
    
    .plan-features {
        margin: 0 0 1rem;
    }
    
    .plan-features li {
        padding: 0.4rem 0;
        font-size: 0.9rem;
    }
    
    .supported-models {
        padding-top: 0.6rem;
        padding-bottom: 0.5rem;
    }

    .models-toggle {
        font-size: 0.8rem;
    }
    
    .model-tags {
        gap: 0.2rem;
    }
    
    .model-tag {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }
    
    .plan-button {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    
    .current-subscription-info {
        margin: 0 0.5rem 1.5rem;
        padding: 1rem;
    }
    
    .plan-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

/* FAQ Section Styles */
.faq-section {
    padding: 2rem 0;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 600;
}

.faq-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background-color: var(--bg-color);
    transition: border-color var(--transition-speed) ease;
    overflow: hidden;
}

.faq-item:hover {
    border-color: var(--accent-color);
}

.faq-question {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--card-bg);
    transition: background-color var(--transition-speed) ease;
}

.faq-question:hover {
    background-color: var(--detail-bg);
}

.faq-question h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
}

.faq-toggle {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--accent-color);
    transition: transform var(--transition-speed) ease;
    user-select: none;
    min-width: 20px;
    text-align: center;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: var(--bg-color);
    padding: 0 1rem 0;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0.5rem 1rem 1rem;
}

.faq-answer p {
    margin: 0;
    color: var(--muted-text-color);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Contact Section Styles */
.contact-section {
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
}

.contact-content p {
    color: var(--muted-text-color);
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.6;
  }

  /* Mobile responsive styles for FAQ and Contact */
@media (max-width: 768px) {
    .faq-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .faq-container {
        padding: 0 1rem;
    }
    
    .faq-question {
        padding: 0.7rem 0.9rem;
    }
    
    .faq-question h3 {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .faq-answer {
        padding: 0 0.9rem 0;
    }
    
    .faq-item.active .faq-answer {
        padding: 0.4rem 0.9rem 0.8rem;
    }
    
    .contact-section {
        padding: 3rem 1rem;
    }
    
    .contact-content h2 {
        font-size: 1.6rem;
    }
    
    .contact-content p {
        font-size: 1rem;
    }
}
