/* ═══════════════════════════════════════════════════════════════
   WHAT'S NEW — Version changelog modal
   ═══════════════════════════════════════════════════════════════ */

/* ── Version link in Settings footer ─────────────────────────── */

.whats-new-link {
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.15s;
    position: relative;
    display: inline-block;
}

.whats-new-link:hover {
    color: var(--primary);
}

.whats-new-link.has-update::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
    animation: wnPulse 2s ease-in-out infinite;
}

@keyframes wnPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

/* ── Modal overlay ───────────────────────────────────────────── */

.whats-new-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.whats-new-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.whats-new-modal {
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    width: 90vw;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.whats-new-overlay.show .whats-new-modal {
    transform: scale(1) translateY(0);
}

/* ── Header ──────────────────────────────────────────────────── */

.whats-new-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.whats-new-title {
    font-size: var(--text-heading);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.whats-new-subtitle {
    font-size: var(--text-small);
    color: var(--text-secondary);
    margin-top: 2px;
}

.whats-new-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.whats-new-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ── Scrollable body ─────────────────────────────────────────── */

.whats-new-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg) var(--space-xl) var(--space-xl);
    -webkit-overflow-scrolling: touch;
}

/* ── Release section ─────────────────────────────────────────── */

.wn-release {
    margin-bottom: var(--space-sm);
}

.wn-release-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.wn-release-version {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.wn-version-number {
    font-size: var(--text-body);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.wn-version-badge {
    display: inline-block;
    padding: 2px var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--text-caption);
    font-weight: var(--font-semibold);
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.wn-badge-current {
    background: linear-gradient(135deg, #5856d6, #af52de);
    color: white;
}

.wn-release-date {
    font-size: var(--text-caption);
    color: var(--text-tertiary);
}

/* ── Compact bullet list ─────────────────────────────────────── */

.wn-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wn-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: var(--text-caption);
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 2px 0;
}

.wn-item-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.wn-item-text {
    min-width: 0;
}

.wn-item-text strong {
    color: var(--text-primary);
    font-weight: var(--font-semibold);
}

/* ── Divider between versions ────────────────────────────────── */

.wn-divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-lg) 0;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 480px) {
    .whats-new-modal {
        width: 95vw;
        max-height: 90vh;
    }

    .whats-new-header {
        padding: var(--space-md) var(--space-lg);
    }

    .whats-new-body {
        padding: var(--space-md) var(--space-lg) var(--space-lg);
    }

}

/* ── Dark mode ───────────────────────────────────────────────── */

[data-theme="dark"] .whats-new-modal {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

