/* static/css/subscriptions/plans.css */
/* Subscription Plans Page - Contract Compliant */

/* =================================================================
   PAGE LAYOUT - Centered Content
   ================================================================= */

.plans-page {
    width: 100%;
    max-width: 100%;
    padding: 3rem 0;
    background: var(--color-light);
}

.plans-container {
    max-width: var(--max-content-width);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* =================================================================
   HEADER SECTION
   ================================================================= */

.plans-header {
    text-center;
    margin-bottom: 3rem;
}

.plans-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 1rem;
}

.plans-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--color-gray-600);
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

/* =================================================================
   MESSAGES
   ================================================================= */

.plans-messages {
    max-width: 48rem;
    margin: 0 auto 2rem;
}

.plan-message {
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
}

.plan-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.plan-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.plan-message.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.plan-message.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #1e3a8a;
}

/* =================================================================
   CURRENT PLAN BANNER
   ================================================================= */

.current-plan-banner {
    max-width: 48rem;
    margin: 0 auto 2rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.current-plan-icon {
    color: var(--color-success);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.current-plan-text {
    font-weight: 500;
    color: #065f46;
}

.current-plan-link {
    font-size: 0.875rem;
    color: #059669;
    text-decoration: underline;
}

/* =================================================================
   PLANS GRID
   ================================================================= */

.plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 80rem;
    margin: 0 auto 4rem;
}

.plan-card {
    background: var(--color-white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 2px solid transparent;
    position: relative;
    transition: all 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.plan-card.highlight {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--color-white);
}

.plan-popular-badge {
    position: absolute;
    top: -0.75rem;
    right: -0.75rem;
    background: #fbbf24;
    color: #1f2937;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
}

/* =================================================================
   PLAN CARD CONTENT
   ================================================================= */

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

.plan-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.plan-icon-wrapper.default {
    background: rgba(59, 130, 246, 0.1);
}

.plan-icon-wrapper.highlight {
    background: rgba(255, 255, 255, 0.2);
}

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

.plan-icon.default {
    color: #3b82f6;
}

.plan-icon.highlight {
    color: var(--color-white);
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.plan-name.default {
    color: var(--color-gray-900);
}

.plan-name.highlight {
    color: var(--color-white);
}

.plan-price-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.plan-price {
    font-size: clamp(2.5rem, 5vw, 3rem);
    font-weight: 800;
}

.plan-price.default {
    color: var(--color-gray-900);
}

.plan-price.highlight {
    color: var(--color-white);
}

.plan-period {
    margin-left: 0.5rem;
}

.plan-period.default {
    color: var(--color-gray-600);
}

.plan-period.highlight {
    color: var(--color-white);
}

.plan-free-badge {
    font-weight: 600;
}

.plan-free-badge.default {
    color: var(--color-success);
}

.plan-free-badge.highlight {
    color: #fbbf24;
}

/* =================================================================
   FEATURE LIST
   ================================================================= */

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.feature-icon {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.feature-icon.default {
    color: var(--color-success);
}

.feature-icon.highlight {
    color: #fbbf24;
}

.feature-text {
    flex: 1;
}

.feature-text.default {
    color: var(--color-gray-700);
}

.feature-text.highlight {
    color: var(--color-white);
}

/* =================================================================
   CTA BUTTONS
   ================================================================= */

.plan-cta-wrapper {
    text-align: center;
}

.plan-cta {
    display: block;
    width: 100%;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.plan-cta.current {
    background: var(--color-gray-200);
    color: var(--color-gray-800);
    cursor: default;
}

.plan-cta.current.highlight {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
}

.plan-cta.primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.plan-cta.primary:hover {
    background: var(--color-primary-dark);
}

.plan-cta.secondary {
    background: var(--color-white);
    color: #3b82f6;
}

.plan-cta.secondary:hover {
    background: #eff6ff;
}

.plan-security-note {
    font-size: 0.75rem;
    margin-top: 0.75rem;
}

.plan-security-note.default {
    color: var(--color-gray-500);
}

.plan-security-note.highlight {
    color: rgba(255, 255, 255, 0.8);
}

/* =================================================================
   FEATURE COMPARISON TABLE
   ================================================================= */

.comparison-section {
    margin-top: 4rem;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

.comparison-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 2rem;
    text-align: center;
}

.comparison-table-wrapper {
    background: var(--color-white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table thead {
    background: var(--color-gray-50);
}

.comparison-table th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-gray-500);
    text-transform: uppercase;
}

.comparison-table th.center {
    text-align: center;
}

.comparison-table tbody tr {
    border-top: 1px solid var(--color-gray-200);
}

.comparison-table tbody tr:nth-child(even) {
    background: var(--color-gray-50);
}

.comparison-table td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: var(--color-gray-900);
}

.comparison-table td.center {
    text-align: center;
}

.comparison-icon-check {
    color: var(--color-success);
}

.comparison-icon-times {
    color: var(--color-gray-300);
}

.comparison-icon-infinity {
    color: #3b82f6;
}

/* =================================================================
   FAQ SECTION
   ================================================================= */

.faq-section {
    max-width: 48rem;
    margin: 4rem auto 0;
}

.faq-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 2rem;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.faq-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: var(--color-gray-600);
    line-height: 1.6;
}

/* =================================================================
   TRUST BADGES
   ================================================================= */

.trust-badges {
    margin-top: 4rem;
    text-align: center;
}

.trust-badges-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    font-size: 0.875rem;
    color: var(--color-gray-500);
    flex-wrap: wrap;
    justify-content: center;
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trust-badge-icon {
    color: var(--color-success);
}

/* =================================================================
   RESPONSIVE DESIGN - Exactly 4 device classes matching contract
   Mobile: ≤576px | Tablet: 577-991px | Laptop: 992-1199px | Desktop: ≥1200px
   ================================================================= */

/* Mobile: ≤576px */
@media (max-width: 576px) {
    .plans-page {
        padding: 2rem 0;
    }

    .plans-grid {
        gap: 1.5rem;
    }

    .plan-card {
        padding: 1.5rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
    }

    .trust-badges-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Tablet: 577px - 991px */
@media (min-width: 577px) and (max-width: 991px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

/* Laptop: 992px - 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: ≥1200px */
@media (min-width: 1200px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =================================================================
   PRINT STYLES
   ================================================================= */

@media print {
    .plan-cta,
    .current-plan-banner,
    .plan-message {
        display: none !important;
    }

    .plan-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}
