/**
 * ResumeAI Pricing Page Styles
 * Mobile-first, clean, and accessible design
 * 
 * [BRANDING] Customize colors in :root variables
 * [LAYOUT] Adjust grid breakpoints in media queries
 */

:root {
    --pricing-primary: #4361ee;
    --pricing-primary-dark: #3651d4;
    --pricing-success: #22c55e;
    --pricing-warning: #f59e0b;
    --pricing-error: #ef4444;
    --pricing-highlight-bg: #f0f7ff;
    --pricing-highlight-border: #4361ee;
    --pricing-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --pricing-card-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -6px rgba(0, 0, 0, 0.05);
}

.pricing-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.pricing-hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.seasonal-banner {
    background: linear-gradient(135deg, var(--pricing-warning) 0%, #f97316 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.seasonal-banner.hidden {
    display: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.pricing-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.pricing-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.billing-toggle {
    display: inline-flex;
    background: #e5e7eb;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.toggle-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--text-light);
}

.toggle-btn.active {
    background: white;
    color: var(--text-dark);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pricing-cards {
    padding: 2rem 1rem;
    max-width: 1300px;
    margin: 0 auto;
}

.plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    justify-items: center;
}

.plan-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--pricing-card-shadow);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    max-width: 380px;
    width: 100%;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pricing-card-hover-shadow);
}

.plan-card.highlighted {
    border-color: var(--pricing-highlight-border);
    background: var(--pricing-highlight-bg);
    transform: scale(1.02);
}

.plan-card.highlighted:hover {
    transform: scale(1.02) translateY(-4px);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pricing-primary);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-badge.lifetime {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.plan-headline {
    font-size: 0.9rem;
    color: var(--text-light);
}

.plan-price {
    text-align: center;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.slashed-price {
    font-size: 1.25rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pricing-primary);
}

.price-period {
    font-size: 1rem;
    color: var(--text-light);
}

.price-type {
    font-size: 0.875rem;
    color: var(--text-light);
    background: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.plan-description {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.feature-check {
    color: var(--pricing-success);
    font-weight: 700;
    flex-shrink: 0;
}

.plan-microcopy {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.plan-testimonial {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.plan-testimonial p {
    color: var(--text-dark);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.testimonial-author {
    color: var(--text-light);
    font-size: 0.8rem;
}

.plan-cta {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.trust-section {
    padding: 2rem 1rem;
    background: #f8fafc;
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.trust-icon {
    font-size: 1.25rem;
}

.promo-section {
    padding: 3rem 1rem;
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.promo-box,
.student-box {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--pricing-card-shadow);
    text-align: center;
}

.promo-box h3,
.student-box h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.student-box p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.promo-input-group,
.student-input-group {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 1rem auto 0;
}

.promo-input-group input,
.student-input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.promo-input-group input:focus,
.student-input-group input:focus {
    outline: none;
    border-color: var(--pricing-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.promo-message,
.student-message {
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.promo-message.success,
.student-message.success {
    color: var(--pricing-success);
}

.promo-message.error,
.student-message.error {
    color: var(--pricing-error);
}

.referral-section {
    padding: 2rem 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.referral-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    color: white;
}

.referral-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.referral-box h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.referral-box p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.referral-box .btn-outline {
    background: white;
    color: #667eea;
    border: none;
}

.referral-box .btn-outline:hover {
    background: #f0f0f0;
}

.referral-link-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.referral-link-container.hidden {
    display: none;
}

.referral-link-container input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
}

.faq-section {
    padding: 4rem 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.faq-section h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.faq-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--pricing-card-shadow);
}

.faq-item h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.faq-item p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
}

.urgency-modal-content {
    text-align: center;
}

.urgency-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.urgency-modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.urgency-subtitle {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.urgency-price {
    margin-bottom: 1.5rem;
}

.urgency-original {
    font-size: 1.25rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.urgency-current {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pricing-success);
}

.urgency-timer {
    background: #fef2f2;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.timer-label {
    font-size: 0.875rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.5rem;
}

.timer-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pricing-error);
    font-family: monospace;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.875rem;
    cursor: pointer;
    margin-top: 1rem;
    text-decoration: underline;
}

.btn-text:hover {
    color: var(--text-dark);
}

.checkout-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.summary-name {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
}

.summary-type {
    font-size: 0.8rem;
    color: var(--text-light);
}

.summary-price {
    text-align: right;
}

.summary-price .slashed {
    font-size: 0.9rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="email"] {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--pricing-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.payment-methods {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.payment-option {
    flex: 1;
    min-width: 100px;
}

.payment-option input {
    display: none;
}

.payment-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.payment-option input:checked + .payment-label {
    border-color: var(--pricing-primary);
    background: var(--pricing-highlight-bg);
}

.payment-icon {
    font-size: 1.5rem;
}

.checkout-promo {
    display: flex;
    gap: 0.5rem;
}

.checkout-promo input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
}

.checkout-promo-result {
    font-size: 0.85rem;
}

.checkout-promo-result .success {
    color: var(--pricing-success);
}

.checkout-promo-result .error {
    color: var(--pricing-error);
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 600;
}

.success-modal-content {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-modal-content h2 {
    color: var(--pricing-success);
    margin-bottom: 0.5rem;
}

.success-modal-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.success-modal-content .btn {
    display: block;
    margin-bottom: 0.75rem;
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.loading-spinner {
    text-align: center;
    padding: 4rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--pricing-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (min-width: 640px) {
    .pricing-title {
        font-size: 2.5rem;
    }

    .promo-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
        align-items: stretch;
    }

    .plan-card {
        max-width: none;
    }

    .plan-card.highlighted {
        grid-column: span 2;
        max-width: 450px;
        justify-self: center;
    }
}

@media (min-width: 1024px) {
    .pricing-hero {
        padding: 4rem 2rem 3rem;
    }

    .pricing-title {
        font-size: 3rem;
    }

    .plans-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .plan-card {
        padding: 2rem 1.5rem;
    }

    .plan-card.highlighted {
        grid-column: span 1;
        max-width: none;
        transform: scale(1.05);
    }

    .plan-card.highlighted:hover {
        transform: scale(1.05) translateY(-4px);
    }
}

@media (min-width: 1280px) {
    .plans-grid {
        gap: 2rem;
    }

    .plan-card {
        padding: 2.5rem 2rem;
    }
}
