/* ===========================================
   Pricing Grid Component Styles (EP-006)
   =========================================== */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem 0;
}

/* When there are 3 cards (anonymous user), use 3 columns */
.pricing-grid:has(.plan-card--free) {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1000px;
}

/* Plan Card Base */
.plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Yearly Plan (Recommended) - Golden highlight */
.plan-card--yearly {
    border: 2px solid #feaf50;
    background: linear-gradient(180deg, rgba(254, 175, 80, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.plan-card--yearly:hover {
    box-shadow: 0 8px 32px rgba(254, 175, 80, 0.2);
}

/* Monthly Plan - Subtle styling */
.plan-card--monthly {
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.plan-card--monthly:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Free Tier Plan - Minimal styling */
.plan-card--free {
    border: 1px dashed rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.01);
}

.plan-card--free:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.25);
}

.plan-card--free .plan-amount {
    color: #888;
}

.plan-card--free .plan-benefits li i {
    color: #666;
}

/* Recommended Badge */
.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #feaf50 0%, #f59e0b 100%);
    color: #1a1a1a;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* Plan Header */
.plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.375rem 0;
}

.plan-interval {
    font-size: 0.875rem;
    color: #888;
    margin: 0;
}

/* Pricing Display */
.plan-pricing {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.plan-currency {
    font-size: 1.25rem;
    font-weight: 500;
    color: #ccc;
}

.plan-amount {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.plan-card--yearly .plan-amount {
    color: #feaf50;
}

.plan-card--monthly .plan-amount {
    color: #fff;
}

.plan-period {
    font-size: 1rem;
    color: #888;
    font-weight: 400;
}

.plan-price-detail {
    font-size: 0.875rem;
    color: #666;
}

/* Benefits List */
.plan-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
    text-align: left;
}

.plan-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: #ccc;
    text-align: left;
}

.plan-benefits li i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.plan-card--yearly .plan-benefits li i {
    color: #feaf50;
}

.plan-card--monthly .plan-benefits li i {
    color: #666;
}

/* CTA Buttons */
.plan-cta {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.plan-cta--primary {
    background: linear-gradient(135deg, #feaf50 0%, #f59e0b 100%);
    color: #1a1a1a;
}

.plan-cta--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(254, 175, 80, 0.4);
    color: #1a1a1a;
}

.plan-cta--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.plan-cta--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #feaf50;
    color: #feaf50;
}

.plan-cta--tertiary {
    background: transparent;
    color: #888;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.plan-cta--tertiary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #feaf50;
    color: #feaf50;
}

/* Savings Note */
.plan-savings {
    text-align: center;
    font-size: 0.8125rem;
    color: #feaf50;
    margin: 1rem 0 0 0;
    font-weight: 500;
}

/* Empty State */
.pricing-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Responsive */
@media (max-width: 968px) {
    .pricing-grid,
    .pricing-grid:has(.plan-card--free) {
        grid-template-columns: 1fr;
        max-width: 400px;
        gap: 2rem;
        padding: 0.5rem;
    }

    .plan-card {
        padding: 1.5rem;
    }

    .plan-card--yearly {
        order: -1; /* Keep yearly first on mobile */
    }

    .plan-card--free {
        order: 1; /* Keep free last on mobile */
    }

    .plan-amount {
        font-size: 2.5rem;
    }

    .plan-name {
        font-size: 1.25rem;
    }
}

/* Context: Embedded in passport page */
.passport-container .pricing-grid {
    margin-top: 1.5rem;
}

.passport-container .plan-card {
    background: rgba(0, 0, 0, 0.2);
}

/* Fix layout when pricing grid is inside passport-actions */
.passport-actions:has(.pricing-grid) {
    flex-direction: column;
    align-items: stretch;
}

.passport-actions:has(.pricing-grid) .pricing-grid {
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Secondary buttons container when pricing grid is present */
.passport-secondary-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
}

.passport-secondary-actions .passport-button {
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .passport-secondary-actions {
        flex-direction: column;
    }

    .passport-secondary-actions .passport-button {
        width: 100%;
        justify-content: center;
    }
}

/* Context: Embedded in journey page */
.fullpass-journey-page .pricing-grid {
    max-width: 900px;
}
