/* Client System Updates (Countdown Header & Changelog Modal) */

/* 1. Countdown Header Banner */
.blink-update-countdown-bar {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: linear-gradient(90deg, #1e293b, #0f172a);
    color: #f8fafc;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
    padding: 8px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    animation: blinkBannerSlideDown 0.3s ease-out;
}

@keyframes blinkBannerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.blink-update-countdown-bar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    font-size: 13px;
    flex-shrink: 0;
    animation: blinkPulse 2s infinite ease-in-out;
}

@keyframes blinkPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.85; }
}

.blink-update-countdown-bar__content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}

.blink-update-countdown-bar__title {
    color: #cbd5e1;
    font-weight: 500;
}

.blink-update-countdown-bar__title strong {
    color: #38bdf8;
}

.blink-update-countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 2px 10px;
    border-radius: 20px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    font-size: 13px;
    color: #fef08a;
    letter-spacing: 0.5px;
}

/* 2. Modal Thông Báo Tính Năng Mới (Announcement Modal) */
.blink-update-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: blinkFadeIn 0.25s ease-out;
}

@keyframes blinkFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.blink-update-modal-card {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: blinkCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes blinkCardPop {
    from {
        transform: scale(0.92) translateY(12px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.blink-update-modal-hero {
    background: linear-gradient(135deg, #1e3a8a, #2563eb, #3b82f6);
    color: #ffffff;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
}

.blink-update-modal-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.blink-update-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.blink-update-modal-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
}

.blink-update-modal-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.blink-update-urgent-box {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 12px 16px;
    margin: 16px 24px 0;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #991b1b;
}

.blink-update-urgent-box strong {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

.blink-update-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    max-height: calc(90vh - 240px);
}

.blink-update-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.blink-update-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blink-update-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.5;
}

.blink-update-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dbeafe;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 2px;
}

.blink-update-plain-text {
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    white-space: pre-line;
}

.blink-update-modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
}

.btn-blink-confirm-update {
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-blink-confirm-update:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-blink-confirm-update:active {
    transform: translateY(0);
}

/* 3. History Modal */
.blink-history-timeline {
    position: relative;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.blink-history-timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: #e2e8f0;
}

.blink-history-item {
    position: relative;
}

.blink-history-dot {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 0 0 3px #dbeafe;
}

.blink-history-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
}

.blink-history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.blink-history-version {
    font-family: monospace;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.blink-history-date {
    font-size: 11px;
    color: #64748b;
}

.blink-history-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 6px;
}

.blink-history-desc {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    white-space: pre-line;
}
