/**
 * Plan Comparison Modal Styles
 * Side-by-side plan comparison
 * Created: December 2025
 */

/* ============================================
   Modal Container
   ============================================ */

.plan-comparison-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.plan-comparison-modal.open {
    display: flex;
}

.plan-comparison-content {
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    background: var(--color-surface);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Modal Header
   ============================================ */

.plan-comparison-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.plan-comparison-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
}

.plan-comparison-close {
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
    border-radius: 8px;
    transition: background 0.2s;
}

.plan-comparison-close:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.plan-comparison-close svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   Modal Body
   ============================================ */

.plan-comparison-body {
    flex: 1;
    overflow-x: auto;
    padding: 24px;
}

/* ============================================
   Comparison Table
   ============================================ */

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

.comparison-table th,
.comparison-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

/* Header Row */
.comparison-table thead tr {
    background: var(--color-bg);
}

.comparison-table th {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    vertical-align: bottom;
}

.comparison-table th:first-child {
    width: 200px;
}

/* Plan Headers */
.plan-header {
    text-align: center;
    padding: 16px !important;
}

.plan-header-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.plan-header-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
}

.plan-header-period {
    font-size: 12px;
    color: var(--color-text-light);
}

.plan-header-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: #f59e0b;
    color: white;
    border-radius: 4px;
}

.plan-header.current {
    background: rgba(37, 99, 235, 0.1);
}

.plan-header.current::after {
    content: 'Current Plan';
    display: block;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-primary);
}

.plan-header.highlighted {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

/* Feature Rows */
.comparison-table tbody tr:hover {
    background: var(--color-bg);
}

.feature-name {
    font-size: 14px;
    color: var(--color-text);
}

.feature-value {
    text-align: center;
    font-size: 14px;
    color: var(--color-text);
}

.feature-value.check {
    color: #10b981;
}

.feature-value.cross {
    color: #d1d5db;
}

.feature-value svg {
    width: 20px;
    height: 20px;
}

/* Category Headers */
.category-row td {
    padding-top: 20px !important;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent !important;
}

/* CTA Row */
.cta-row td {
    padding: 20px 16px !important;
    border-bottom: none;
}

.cta-row .plan-cta-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.cta-row .plan-cta-btn.primary {
    color: white;
    background: linear-gradient(135deg, #0D4F2B, #1AACB8);
}

.cta-row .plan-cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 79, 43, 0.3);
}

.cta-row .plan-cta-btn.secondary {
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.cta-row .plan-cta-btn.secondary:hover {
    background: var(--color-border);
}

.cta-row .plan-cta-btn.current {
    color: var(--color-text-light);
    background: var(--color-bg);
    cursor: default;
}

/* ============================================
   Confetti Animation
   ============================================ */

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2000;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f59e0b;
    animation: confetti-fall 3s ease-out forwards;
}

.confetti:nth-child(2n) { background: #10b981; width: 8px; height: 8px; }
.confetti:nth-child(3n) { background: #3b82f6; width: 12px; height: 12px; }
.confetti:nth-child(4n) { background: #ef4444; width: 6px; height: 6px; }
.confetti:nth-child(5n) { background: #8b5cf6; width: 14px; height: 14px; }

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   Upgrade Success Toast
   ============================================ */

.upgrade-success-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    padding: 32px 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    text-align: center;
    z-index: 2001;
    opacity: 0;
    transition: all 0.3s ease;
}

.upgrade-success-toast.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.upgrade-success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upgrade-success-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}

.upgrade-success-message {
    font-size: 14px;
    color: var(--color-text-light);
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
    .plan-comparison-modal {
        padding: 0;
    }

    .plan-comparison-content {
        max-height: 100vh;
        border-radius: 0;
    }

    .plan-comparison-body {
        padding: 16px;
    }

    .comparison-table {
        min-width: 600px;
    }

    .comparison-table th:first-child {
        width: 120px;
    }

    .plan-header-price {
        font-size: 20px;
    }
}
