/**
 * Page-specific styles for /subscribe/products (subscription/products.html).
 * Edit design tokens in design-tokens/tokens.json, not here.
 */

/* Pricing Toggle Styles */
    .pricing-toggle-container {
        display: inline-flex;
        gap: 0.5rem;
        padding: 0.5rem;
        background: rgba(107, 114, 128, 0.1);
        border-radius: 12px;
        margin-bottom: 3rem;
    }
    
    .pricing-toggle {
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-size: 1.125rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
        background: transparent;
    }
    
    .pricing-toggle.active {
        background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
        transform: translateY(-1px);
    }
    
    .pricing-toggle:not(.active) {
        color: #9ca3af;
    }
    
    .dark .pricing-toggle:not(.active) {
        color: #6b7280;
    }
    
    .pricing-toggle:not(.active):hover {
        background: rgba(147, 51, 234, 0.1);
        color: #9333ea;
    }
    
    .save-badge {
        display: inline-block;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        padding: 0.25rem 0.625rem;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: 700;
        margin-left: 0.5rem;
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.8; }
    }
    
    /* Pricing Container */
    .pricing-container {
        max-width: 1400px;
        margin: 0 auto;
        background: #ffffff;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }
    
    .dark .pricing-container {
        background: #1e1e2f;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
    
    /* Pricing Table */
    .pricing-table {
        width: 100%;
        border-collapse: collapse;
    }
    
    /* Header Row with Plan Names and Prices */
    .pricing-header {
        background: #f9fafb;
    }
    
    .dark .pricing-header {
        background: #1a1a2a;
    }
    
    .pricing-header th {
        padding: 2rem 1.5rem;
        vertical-align: top;
        border-right: 1px solid rgba(229, 231, 235, 0.5);
    }
    
    .dark .pricing-header th {
        border-right-color: rgba(75, 85, 99, 0.3);
    }
    
    .pricing-header th:first-child {
        border-right: none;
        width: 30%;
    }
    
    .pricing-header th:last-child {
        border-right: none;
    }
    
    /* Plan Header Cell */
    .plan-header-cell {
        position: relative;
        text-align: center;
        vertical-align: top;
    }
    
    .plan-header-content {
        display: flex;
        flex-direction: column;
        min-height: 380px;
        align-items: center;
        position: relative;
    }
    
    .plan-header-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding-top: 3rem;
        flex-shrink: 0;
    }
    
    .plan-header-button-container {
        margin-top: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-bottom: 1rem;
    }
    
    .plan-header-cell.pro-header {
        background: rgba(147, 51, 234, 0.05);
    }
    
    .dark .plan-header-cell.pro-header {
        background: rgba(147, 51, 234, 0.1);
    }
    
    /* Most Popular Badge */
    .popular-badge {
        display: inline-block;
        background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
        color: white;
        padding: 0.375rem 1rem;
        border-radius: 20px;
        font-size: 0.6875rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        box-shadow: 0 2px 8px rgba(147, 51, 234, 0.4);
        height: 26px;
        flex-shrink: 0;
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }
    
    
    /* Plan Name */
    .plan-name {
        font-size: 1.75rem;
        font-weight: 800;
        margin-bottom: 1rem;
        color: #111827;
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dark .plan-name {
        color: #f9fafb;
    }
    
    .pro-header .plan-name {
        background: linear-gradient(135deg, #9333ea 0%, #c084fc 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    /* Plan Price */
    .plan-price {
        font-size: 2.25rem;
        font-weight: 900;
        line-height: 1.2;
        color: #111827;
        margin-bottom: 0.5rem;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dark .plan-price {
        color: #f9fafb;
    }
    
    .pro-header .plan-price {
        font-size: 2.5rem;
        color: #9333ea;
    }
    
    .dark .pro-header .plan-price {
        color: #c084fc;
    }
    
    .price-period {
        font-size: 0.875rem;
        color: #6b7280;
        font-weight: 500;
        min-height: 21px;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .plan-description {
        font-size: 0.8125rem;
        color: #6b7280;
        margin-top: 0.5rem;
        margin-bottom: 1.5rem;
        font-style: italic;
        min-height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dark .plan-description {
        color: #9ca3af;
    }
    
    /* CTA Buttons */
    .plan-cta {
        width: 100%;
        max-width: 200px;
        padding: 0.875rem 1.5rem;
        border-radius: 10px;
        font-size: 1rem;
        font-weight: 700;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 0;
        flex-shrink: 0;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .plan-cta.primary {
        background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
    }
    
    .plan-cta.primary:hover:not(:disabled) {
        box-shadow: 0 6px 16px rgba(147, 51, 234, 0.4);
        transform: translateY(-2px);
    }
    
    .plan-cta.secondary {
        background: transparent;
        color: #6b7280;
        border: 2px solid #e5e7eb;
    }
    
    .dark .plan-cta.secondary {
        border-color: #4b5563;
        color: #9ca3af;
    }
    
    .plan-cta.secondary:hover:not(:disabled) {
        border-color: #9333ea;
        color: #9333ea;
        background: rgba(147, 51, 234, 0.05);
    }
    
    .plan-cta:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
    
    .pro-header .plan-cta {
        padding: 1rem 1.75rem;
        font-size: 1.0625rem;
        min-height: 52px;
    }
    
    /* Current Plan Badge */
    .current-plan-badge {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        padding: 0.25rem 0.75rem;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        flex-shrink: 0;
        min-height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 0.75rem;
    }

    /* Hidden state - still takes up space */
    .current-plan-badge.hidden {
        visibility: hidden;
    }
    /* Empty placeholder for Free column to maintain button alignment */
    .plan-header-cell[data-plan-tier="free"] .plan-header-button-container {
        min-height: 128px; /* 48px button + 28px badge + 0.75rem gap + padding */
    }
    
    /* Cancellation Badge */
    .cancellation-badge {
        background: #f3f4f6;
        color: #6b7280;
        padding: 0.375rem 0.75rem;
        border-radius: 16px;
        font-size: 0.75rem;
        font-weight: 600;
        margin-top: 0.5rem;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        border: 1px solid #e5e7eb;
    }
    
    .cancellation-badge svg {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
    }
    
    .cancellation-badge.hidden {
        display: none;
    }
    
    /* Feature Rows */
    .pricing-table tbody tr {
        border-bottom: 1px solid rgba(229, 231, 235, 0.5);
        transition: background-color 0.2s ease;
    }
    
    .dark .pricing-table tbody tr {
        border-bottom-color: rgba(75, 85, 99, 0.3);
    }
    
    .pricing-table tbody tr:hover {
        background: rgba(249, 250, 251, 0.5);
    }
    
    .dark .pricing-table tbody tr:hover {
        background: rgba(31, 41, 55, 0.3);
    }
    
    .pricing-table tbody tr:nth-child(even) {
        background: rgba(249, 250, 251, 0.3);
    }
    
    .dark .pricing-table tbody tr:nth-child(even) {
        background: rgba(31, 41, 55, 0.2);
    }
    
    .pricing-table tbody td {
        padding: 1.25rem 1.5rem;
        vertical-align: middle;
        border-right: 1px solid rgba(229, 231, 235, 0.3);
    }
    
    .dark .pricing-table tbody td {
        border-right-color: rgba(75, 85, 99, 0.2);
    }
    
    .pricing-table tbody td:last-child {
        border-right: none;
    }
    
    /* Feature Name Column */
    .feature-name {
        font-weight: 600;
        color: #374151;
        font-size: 0.9375rem;
    }
    
    .dark .feature-name {
        color: #d1d5db;
    }
    
    /* Feature Value Cells */
    .feature-value-cell {
        text-align: center;
        font-size: 0.9375rem;
        font-weight: 500;
        color: #111827;
    }
    
    .dark .feature-value-cell {
        color: #f3f4f6;
    }
    
    .pro-column {
        background: rgba(147, 51, 234, 0.02);
    }
    
    .dark .pro-column {
        background: rgba(147, 51, 234, 0.05);
    }
    
    /* Current Plan Highlighting */
    .current-plan-column {
        background: rgba(16, 185, 129, 0.03) !important;
    }
    
    .dark .current-plan-column {
        background: rgba(16, 185, 129, 0.08) !important;
    }
    
    .cancel-button,
    .change-plan-button {
        background: transparent !important;
        color: #6b7280 !important;
        border: 2px solid #e5e7eb !important;
    }
    
    .dark .cancel-button,
    .dark .change-plan-button {
        border-color: #4b5563 !important;
        color: #9ca3af !important;
    }
    
    .cancel-button:hover:not(:disabled),
    .change-plan-button:hover:not(:disabled) {
        border-color: #9333ea !important;
        color: #9333ea !important;
        background: rgba(147, 51, 234, 0.05) !important;
    }
    
    .feature-check {
        color: #10b981;
        font-size: 1.25rem;
        font-weight: 700;
    }
    
    .feature-dash {
        color: #9ca3af;
        font-size: 1.25rem;
    }
    
    .feature-coming-soon {
        font-size: 0.6875rem;
        color: #9333ea;
        font-weight: 600;
        display: block;
        margin-top: 0.25rem;
    }
    
    /* Tooltip Styles */
    .tooltip {
        display: inline-block;
        position: relative;
        margin-left: 0.375rem;
    }
    
    .info-icon {
        cursor: pointer;
        background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
        color: white;
        border-radius: 50%;
        width: 16px;
        height: 16px;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        font-size: 11px;
        border: none;
        font-weight: 700;
        transition: all 0.2s ease;
    }
    
    .info-icon:hover {
        transform: scale(1.15);
        box-shadow: 0 2px 8px rgba(147, 51, 234, 0.4);
    }
    
    .tooltiptext {
        visibility: hidden;
        width: 220px;
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        color: #fff;
        text-align: center;
        border-radius: 8px;
        padding: 0.625rem;
        position: absolute;
        z-index: 1000;
        bottom: 125%;
        left: 50%;
        margin-left: -110px;
        opacity: 0;
        transition: opacity 0.3s;
        font-size: 0.8125rem;
        line-height: 1.4;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .tooltiptext::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #111827 transparent transparent transparent;
    }
    
    /* Mobile Card Layout */
    .pricing-cards-container {
        display: none; /* Hidden by default, shown on mobile */
    }
    
    .pricing-card {
        background: #ffffff;
        border-radius: 16px;
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        position: relative;
    }
    
    .dark .pricing-card {
        background: #1e1e2f;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
    
    .pricing-card.pro-card {
        background: #ffffff;
        border: 2px solid #9333ea;
    }
    
    .dark .pricing-card.pro-card {
        background: #1e1e2f;
        border-color: #9333ea;
    }
    
    .pricing-card-header {
        text-align: center;
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .dark .pricing-card-header {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .mobile-popular-badge {
        display: inline-block;
        background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
        color: white;
        padding: 0.375rem 1rem;
        border-radius: 20px;
        font-size: 0.6875rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        box-shadow: 0 2px 8px rgba(147, 51, 234, 0.4);
        margin-bottom: 1rem;
    }
    
    .pricing-card-plan-name {
        font-size: 2rem;
        font-weight: 800;
        margin-bottom: 0.75rem;
        color: #111827;
    }
    
    .dark .pricing-card-plan-name {
        color: #f9fafb;
    }
    
    .pro-card .pricing-card-plan-name {
        background: linear-gradient(135deg, #9333ea 0%, #c084fc 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .pricing-card-price {
        font-size: 2.5rem;
        font-weight: 900;
        color: #111827;
        margin-bottom: 0.25rem;
    }
    
    .dark .pricing-card-price {
        color: #f9fafb;
    }
    
    .pro-card .pricing-card-price {
        color: #9333ea;
    }
    
    .dark .pro-card .pricing-card-price {
        color: #c084fc;
    }
    
    .pricing-card-period {
        font-size: 0.875rem;
        color: #6b7280;
        font-weight: 500;
        margin-bottom: 0.5rem;
    }
    
    .pricing-card-description {
        font-size: 0.875rem;
        color: #6b7280;
        font-style: italic;
    }
    
    .dark .pricing-card-description {
        color: #9ca3af;
    }
    
    .pricing-card-button {
        width: 100%;
        padding: 1rem 1.5rem;
        border-radius: 10px;
        font-size: 1.0625rem;
        font-weight: 700;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-bottom: 1rem;
    }
    
    .pricing-card-button.primary {
        background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
    }
    
    .pricing-card-button.primary:hover:not(:disabled) {
        box-shadow: 0 6px 16px rgba(147, 51, 234, 0.4);
        transform: translateY(-2px);
    }
    
    .pricing-card-button.secondary {
        background: transparent;
        color: #6b7280;
        border: 2px solid #e5e7eb;
    }
    
    .dark .pricing-card-button.secondary {
        border-color: #4b5563;
        color: #9ca3af;
    }
    
    .pricing-card-button.secondary:hover:not(:disabled) {
        border-color: #9333ea;
        color: #9333ea;
        background: rgba(147, 51, 234, 0.05);
    }
    
    .pricing-card-button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
    
    /* Mobile cancel and restore button styles */
    .pricing-card-button.mobile-cancel-button,
    .pricing-card-button.mobile-restore-button {
        background: transparent !important;
        color: #6b7280 !important;
        border: 2px solid #e5e7eb !important;
    }
    
    .dark .pricing-card-button.mobile-cancel-button,
    .dark .pricing-card-button.mobile-restore-button {
        border-color: #4b5563 !important;
        color: #9ca3af !important;
    }
    
    .pricing-card-button.mobile-cancel-button:hover:not(:disabled),
    .pricing-card-button.mobile-restore-button:hover:not(:disabled) {
        border-color: #9333ea !important;
        color: #9333ea !important;
        background: rgba(147, 51, 234, 0.05) !important;
    }
    
    .mobile-badges-container {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
        min-height: 28px;
    }
    
    .mobile-badges-container.with-both {
        justify-content: space-between;
    }
    
    .mobile-current-plan-badge {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        padding: 0.375rem 0.75rem;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: inline-block;
        text-align: center;
    }
    
    .mobile-current-plan-badge.hidden {
        display: none;
    }
    
    .mobile-cancellation-badge {
        background: #f3f4f6;
        color: #6b7280;
        padding: 0.375rem 0.75rem;
        border-radius: 16px;
        font-size: 0.75rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        border: 1px solid #e5e7eb;
    }
    
    .mobile-cancellation-badge svg {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
    }
    
    .mobile-cancellation-badge.hidden {
        display: none;
    }
    
    .pricing-card-features {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .pricing-card-feature {
        display: flex;
        align-items: flex-start;
        padding: 0.375rem 0;
        font-size: 0.9375rem;
    }
    
    .pricing-card-feature-icon {
        flex-shrink: 0;
        margin-right: 0.75rem;
        font-size: 1.125rem;
        font-weight: 700;
        width: 24px;
        text-align: center;
    }
    
    .pricing-card-feature-icon.check {
        color: #10b981;
    }
    
    .pricing-card-feature-icon.dash {
        color: #9ca3af;
    }
    
    .pricing-card-feature-text {
        flex: 1;
        color: #374151;
        font-weight: 500;
    }
    
    .dark .pricing-card-feature-text {
        color: #d1d5db;
    }
    
    .pricing-card-feature-value {
        flex-shrink: 0;
        color: #6b7280;
        font-weight: 600;
        margin-left: 0.5rem;
    }
    
    .dark .pricing-card-feature-value {
        color: #9ca3af;
    }
    
    .pricing-card-section-divider {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .dark .pricing-card-section-divider {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .pricing-card-section-title {
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #6b7280;
        margin-bottom: 0.75rem;
    }
    
    .dark .pricing-card-section-title {
        color: #9ca3af;
    }
    
    .all-plans-section {
        margin-top: 2rem;
        padding: 1.5rem;
        background: #ffffff;
        border-radius: 12px;
        border: 1px solid rgba(147, 51, 234, 0.2);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .dark .all-plans-section {
        background: #1e1e2f;
        border-color: rgba(147, 51, 234, 0.3);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .all-plans-section .pricing-card-section-title {
        text-align: center;
        margin-bottom: 1rem;
    }

    /* Mobile Responsive */
    @media (max-width: 1024px) {
        .pricing-container {
            overflow-x: auto;
        }
        
        .pricing-table {
            min-width: 800px;
        }
        
        .plan-header-content {
            min-height: 360px;
        }
        
        .plan-price {
            font-size: 1.875rem;
            min-height: 50px;
        }
        
        .pro-header .plan-price {
            font-size: 2.125rem;
            min-height: 54px;
        }
        
        .plan-name {
            min-height: 38px;
        }
    }
    
    @media (max-width: 768px) {
        /* Hide table on mobile, show card layout */
        .pricing-container {
            display: none;
        }
        
        .pricing-cards-container {
            display: block;
            max-width: 600px;
            margin: 0 auto;
        }
        
        /* Compact toggle for mobile */
        .pricing-toggle-container {
            padding: 0.375rem;
            gap: 0.375rem;
            margin-bottom: 2rem;
        }
        
        .pricing-toggle {
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
        }
        
        .save-badge {
            font-size: 0.625rem;
            padding: 0.125rem 0.5rem;
            margin-left: 0.375rem;
        }
    }
    
    @media (max-width: 640px) {
        section.py-10 {
            padding-top: 5rem !important;
            padding-bottom: 2rem !important;
        }
        
        h1 {
            font-size: 1.75rem !important;
            margin-bottom: 0.75rem !important;
        }
        
        h1 + p {
            font-size: 0.875rem !important;
            margin-bottom: 1.5rem !important;
        }
        
        .pricing-card {
            padding: 1.5rem 1.25rem;
            margin-bottom: 1.25rem;
        }
        
        .pricing-card-plan-name {
            font-size: 1.75rem;
        }
        
        .pricing-card-price {
            font-size: 2rem;
        }
    }

/* Inline soon-tag indicator (replaces inline `style="font-size: 0.7rem; font-style: italic;"`). */
.pricing-card-feature-soon {
    font-size: 0.7rem;
    font-style: italic;
}
