/**
 * Subscription Selection Page Styling
 *
 * Modern, clean design consistent with Tickedify app styling
 * macOS-inspired theme with responsive design
 */

/* Page Layout */
.subscription-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1a202c;
    overflow-x: hidden;
}

/* Header Section */
.subscription-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo i {
    font-size: 32px;
    color: var(--macos-blue, #007AFF);
}

.logo span {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
}

.header-subtitle {
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
}

/* Main Content */
.subscription-main {
    padding: 48px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.subscription-container {
    position: relative;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 48px;
}

.welcome-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.welcome-description {
    font-size: 18px;
    color: #64748b;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Pricing Plans */
.pricing-plans {
    margin-bottom: 48px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Plan Option Cards */
.plan-option {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.plan-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(0, 122, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.plan-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 122, 255, 0.15);
    border-color: var(--macos-blue, #007AFF);
}

.plan-option:hover::before {
    opacity: 1;
}

.plan-option.plan-selected {
    border-color: var(--macos-blue, #007AFF);
    background: rgba(0, 122, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 122, 255, 0.2);
}

.plan-option.plan-selected::before {
    opacity: 1;
}

.plan-option.plan-recommended {
    border-color: #10b981;
    position: relative;
}

.plan-option.plan-recommended::after {
    content: '🌟 Aanbevolen';
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Plan Header */
.plan-header {
    margin-bottom: 24px;
}

.plan-name {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
}

.plan-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--macos-blue, #007AFF);
    margin: 0;
}

/* Plan Details */
.plan-description {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
}

.plan-highlight {
    font-size: 14px;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 24px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    display: inline-block;
}

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

.plan-features li {
    padding: 8px 0;
    color: #475569;
    font-size: 15px;
    position: relative;
    padding-left: 24px;
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 8px;
    color: #10b981;
    font-weight: 700;
    font-size: 16px;
}

/* Plan Action Button - Aligned at bottom of flex container */
.plan-action-button {
    margin-top: auto;
}

/* Selection Indicator */
.plan-selection-indicator {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.plan-option:hover .plan-selection-indicator {
    border-color: var(--macos-blue, #007AFF);
    background: rgba(0, 122, 255, 0.1);
}

.plan-option.plan-selected .plan-selection-indicator {
    border-color: var(--macos-blue, #007AFF);
    background: var(--macos-blue, #007AFF);
    color: white;
}

.plan-selection-indicator i {
    font-size: 14px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.plan-option.plan-selected .plan-selection-indicator i {
    opacity: 1;
    transform: scale(1);
}

/* Selection Actions */
.selection-actions {
    text-align: center;
    margin-bottom: 48px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    min-width: 160px;
    margin: 0 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--macos-blue, #007AFF) 0%, #0056D3 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 122, 255, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #64748b;
    border: 2px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(248, 250, 252, 0.95);
    border-color: var(--macos-blue, #007AFF);
    color: var(--macos-blue, #007AFF);
    transform: translateY(-2px);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 32px;
    color: var(--macos-blue, #007AFF);
    margin-bottom: 16px;
    animation: spin 1s linear infinite;
}

.loading-spinner span {
    display: block;
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
}

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

/* Footer */
.subscription-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    padding: 32px 24px;
    text-align: center;
    margin-top: 48px;
}

.footer-content p {
    margin: 0 0 16px 0;
    color: #64748b;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-content i {
    color: #10b981;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-link {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--macos-blue, #007AFF);
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 32, 44, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 24px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(100, 116, 139, 0.1);
    color: #1a202c;
}

.modal-body {
    padding: 16px 24px;
}

.modal-body p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.modal-footer {
    padding: 16px 24px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .subscription-main {
        padding: 32px 16px;
    }

    .welcome-title {
        font-size: 28px;
    }

    .welcome-description {
        font-size: 16px;
    }

    .plans-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .plan-option {
        padding: 24px 20px;
    }

    .plan-name {
        font-size: 22px;
    }

    .plan-price {
        font-size: 28px;
    }

    .btn {
        padding: 14px 24px;
        font-size: 15px;
        margin: 8px 4px;
        min-width: 140px;
    }

    .selection-actions {
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        gap: 8px;
    }

    .header-content {
        padding: 0 16px;
    }

    .logo span {
        font-size: 24px;
    }

    .header-subtitle {
        font-size: 14px;
    }

    .modal {
        padding: 16px;
    }

    .modal-content {
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: 24px;
    }

    .plan-option.plan-recommended::after {
        top: 12px;
        right: 12px;
        padding: 4px 8px;
        font-size: 11px;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

/* High DPI / Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .plan-option {
        border-width: 1px;
    }

    .btn-secondary {
        border-width: 1px;
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    :root {
        --macos-blue: #0A84FF;
    }
}

/* Animation for plan loading */
.plan-option {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.plan-option:nth-child(1) { animation-delay: 0.1s; }
.plan-option:nth-child(2) { animation-delay: 0.2s; }
.plan-option:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for accessibility */
.plan-option:focus-visible {
    outline: 2px solid var(--macos-blue, #007AFF);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid var(--macos-blue, #007AFF);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .loading-overlay,
    .modal {
        display: none !important;
    }

    .subscription-page {
        background: white;
    }

    .plan-option {
        border: 2px solid #ccc;
        break-inside: avoid;
    }
}