/* ============================================================
   FLASH SALE IP TIMER v3 – CSS
   ============================================================ */

.fsip-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,0.12);
}

/* ── SKELETON ───────────────────────────────────────────── */
.fsip-loading { padding: 4px; background: #f5f5f5; border-radius: 8px; }
.fsip-skeleton {
    height: 90px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: fsip-shimmer 1.4s infinite;
    border-radius: 6px;
}
@keyframes fsip-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── BADGES ─────────────────────────────────────────────── */
.fsip-badges-bar {
    display: flex;
    gap: 6px;
    padding: 6px 12px;
    background: #fff8f6;
    border: 1px solid #fad5cc;
    border-bottom: none;
    flex-wrap: wrap;
}
.fsip-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
}
.fsip-badge--personal { background: #fff3cd; color: #7d4e00; border: 1px solid #ffc107; }
.fsip-badge--time     { background: #fde8e4; color: #c0392b; border: 1px solid #f5c6bc; }

/* ── MAIN BAR ───────────────────────────────────────────── */
.fsip-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    gap: 10px;
}
.fsip-bar--active  { background: #ee4d2d; }
.fsip-bar--expired { background: #888; }
.fsip-bar--urgent  { animation: fsip-pulse 0.8s ease-in-out infinite; }
@keyframes fsip-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.82; }
}

/* ── LEFT: GIÁ ──────────────────────────────────────────── */
.fsip-left { display: flex; align-items: center; gap: 8px; }

.fsip-discount-tag {
    background: #fff;
    color: #ee4d2d;
    font-size: 13px;
    font-weight: 800;
    border-radius: 4px;
    padding: 4px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.fsip-expired-label {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    font-weight: 600;
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 4px 7px;
    white-space: nowrap;
}

.fsip-price-group { display: flex; flex-direction: column; }

.fsip-sale-price {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.fsip-original-price {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    text-decoration: line-through;
    margin-top: 2px;
}

/* ── RIGHT: ĐẾM NGƯỢC ──────────────────────────────────── */
.fsip-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.fsip-flash-icon {
    font-size: 26px;
    animation: fsip-flicker 1.4s ease-in-out infinite;
    filter: drop-shadow(0 0 4px #ffe066);
}
@keyframes fsip-flicker {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}

.fsip-timer-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.fsip-event-label {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
    align-self: flex-end;
}

/* ── COUNTDOWN: ô số ────────────────────────────────────── */
.fsip-countdown {
    display: flex;
    align-items: flex-start;
    gap: 3px;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.fsip-time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.fsip-time {
    background: rgba(0,0,0,0.25);
    border-radius: 3px;
    padding: 2px 6px;
    min-width: 28px;
    text-align: center;
    display: inline-block;
    line-height: 1.3;
}

.fsip-sep {
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.6;
    margin-top: 2px;
}

.fsip-unit-label {
    font-size: 9px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* ── RESET INFO (khi hết giờ) ───────────────────────────── */
.fsip-reset-info { display: flex; flex-direction: column; align-items: flex-end; }
.fsip-reset-label { font-size: 10px; color: rgba(255,255,255,0.8); }
.fsip-reset-countdown { font-size: 14px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }

/* ── NÚT MUA ────────────────────────────────────────────── */
.fsip-btn {
    display: block;
    width: 100%;
    text-align: center;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    padding: 13px 20px;
    text-decoration: none !important;
    letter-spacing: 0.3px;
    transition: background 0.2s, filter 0.2s;
    border-top: 2px solid rgba(0,0,0,0.1);
    box-sizing: border-box;
}
.fsip-btn--active  { background: #ee4d2d; }
.fsip-btn--expired { background: #888; }
.fsip-btn:hover    { filter: brightness(0.9); }

/* ── MESSAGE BOX ────────────────────────────────────────── */
.fsip-message-box {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 16px 18px;
    text-align: center;
}
.fsip-message-box p {
    font-size: 14px;
    color: #555;
    margin: 0 0 8px;
    line-height: 1.6;
}
.fsip-reset-note { font-size: 12px; color: #888; }
.fsip-reset-note strong { color: #ee4d2d; font-variant-numeric: tabular-nums; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .fsip-sale-price { font-size: 18px; }
    .fsip-countdown  { font-size: 14px; }
    .fsip-flash-icon { font-size: 20px; }
    .fsip-time       { min-width: 22px; padding: 2px 4px; }
}

/* ── EDITOR PREVIEW BAR ─────────────────────────────────── */
.fsip-editor-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a73e8;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
}
