.lm-home-live-notice {
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 440px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 24px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #dbeafe;
    border-radius: 24px;
    background: #fff;
    color: #172554;
    box-shadow: 0 24px 80px rgb(15 23 42 / 22%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
}

.lm-home-live-notice:not([open]) {
    display: none;
}

.lm-home-live-notice::backdrop {
    background: rgb(15 23 42 / 52%);
}

html.lm-home-live-notice-open,
body.lm-home-live-notice-open {
    overflow: hidden;
    overscroll-behavior: none;
    scrollbar-gutter: stable;
}

.lm-home-live-notice *,
.lm-home-live-notice *::before,
.lm-home-live-notice *::after {
    box-sizing: border-box;
}

.lm-home-live-notice__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -8px -8px 4px 0;
}

.lm-home-live-notice__brand {
    padding: 6px 11px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: -.02em;
}

.lm-home-live-notice__close,
.lm-home-live-notice__later {
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #475569;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.lm-home-live-notice__close {
    display: grid;
    min-width: 44px;
    padding: 10px;
    place-items: center;
    border-radius: 50%;
}

.lm-home-live-notice__close:hover,
.lm-home-live-notice__later:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.lm-home-live-notice__illustration {
    display: flex;
    justify-content: center;
    margin: 0 0 12px;
}

.lm-home-live-notice__illustration svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.lm-home-live-notice__label {
    margin: 0 0 9px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.lm-home-live-notice__title {
    margin: 0;
    color: #172554;
    font-size: 28px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}

.lm-home-live-notice__body {
    margin: 16px 0 24px;
    color: #475569;
    font-size: 15px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    white-space: pre-line; /* giữ xuống dòng khi quản trị nhập thông báo nhiều đoạn */
}

.lm-home-live-notice__actions {
    display: grid;
    gap: 6px;
}

.lm-home-live-notice__snooze {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: -12px 0 16px;
    padding: 10px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
}

.lm-home-live-notice__snooze input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.lm-home-live-notice__snooze span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.lm-home-live-notice__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    min-height: 48px;
    padding: 13px 16px;
    border: 1px solid #2563eb;
    border-radius: 14px;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.lm-home-live-notice__cta span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.lm-home-live-notice__cta svg {
    flex-shrink: 0;
}

.lm-home-live-notice__cta:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

.lm-home-live-notice__later {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.lm-home-live-notice :focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

@media (max-width: 360px) {
    .lm-home-live-notice {
        padding: 20px;
        border-radius: 20px;
    }

    .lm-home-live-notice__title {
        font-size: 25px;
    }

    .lm-home-live-notice__body {
        font-size: 14px;
    }
}

/* Ảnh popup do quản trị đặt (2026-11-04, Claude) */
.lm-home-live-notice__photo {
    margin: 0 0 12px;
    text-align: center;
}

.lm-home-live-notice__photo img {
    display: block;
    width: 100%;
    max-height: 56vh;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #fecaca;
}

/* Video hướng dẫn trong popup (2026-11-13, Claude): video dọc 9:16, chỉ bản tiếng Việt */
.lm-home-live-notice__video {
    display: flex;
    justify-content: center;
    margin: 0 0 14px;
}

.lm-home-live-notice__video video {
    display: block;
    width: auto;
    max-width: 100%;
    height: clamp(200px, calc(100vh - 460px), 420px);
    height: clamp(200px, calc(100dvh - 460px), 420px);
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    background: #0f172a;
    box-shadow: 0 10px 28px rgb(15 23 42 / 24%);
    object-fit: contain;
}

.lm-home-live-notice:has(.lm-home-live-notice__video) .lm-home-live-notice__title {
    font-size: 22px;
}

.lm-home-live-notice:has(.lm-home-live-notice__video) .lm-home-live-notice__body {
    margin: 10px 0 20px;
    font-size: 14px;
    line-height: 1.55;
}

@media (max-width: 480px) {
    .lm-home-live-notice:has(.lm-home-live-notice__video) {
        padding: 18px;
    }

    .lm-home-live-notice__video {
        margin-bottom: 10px;
    }

    .lm-home-live-notice__video video {
        height: clamp(200px, calc(100vh - 425px), 420px);
        height: clamp(200px, calc(100dvh - 425px), 420px);
    }

    .lm-home-live-notice:has(.lm-home-live-notice__video) .lm-home-live-notice__title {
        font-size: 20px;
    }

    .lm-home-live-notice:has(.lm-home-live-notice__video) .lm-home-live-notice__body {
        margin: 8px 0 14px;
    }

    .lm-home-live-notice:has(.lm-home-live-notice__video) .lm-home-live-notice__snooze {
        margin: -8px 0 8px;
    }
}

/* Nút HOT (nhãn nút bắt đầu bằng biểu tượng lửa) */
.lm-home-live-notice__cta.is-hot,
.lm-home-live-notice__later.is-hot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 13px 16px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #ef4444 55%, #e11d48);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .01em;
    text-decoration: none;
    box-shadow: 0 10px 24px rgb(239 68 68 / 34%);
    animation: lm-notice-hot 1.8s ease-in-out infinite;
}

.lm-home-live-notice__cta.is-hot:hover,
.lm-home-live-notice__later.is-hot:hover {
    background: linear-gradient(135deg, #ea580c, #dc2626 55%, #be123c);
    color: #fff;
}

.lm-home-live-notice__hot {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 3px;
    padding: 3px 8px 3px 6px;
    border-radius: 999px;
    background: #fef08a;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: .04em;
}

.lm-home-live-notice__hot svg {
    animation: lm-notice-flame .9s ease-in-out infinite alternate;
    transform-origin: 50% 100%;
}

@keyframes lm-notice-hot {
    0%, 100% { box-shadow: 0 10px 24px rgb(239 68 68 / 34%), 0 0 0 0 rgb(249 115 22 / 45%); }
    50% { box-shadow: 0 10px 24px rgb(239 68 68 / 34%), 0 0 0 9px rgb(249 115 22 / 0%); }
}

@keyframes lm-notice-flame {
    from { transform: scale(.92) rotate(-4deg); }
    to { transform: scale(1.12) rotate(4deg); }
}

@media (prefers-reduced-motion: reduce) {
    .lm-home-live-notice__cta.is-hot,
    .lm-home-live-notice__later.is-hot,
    .lm-home-live-notice__hot svg {
        animation: none;
    }
}

/* Cảnh báo mạo danh ở tên miền chính (home-alert-notice.php, 2026-11-25, Claude): viền và nhãn đỏ để khác hẳn thông báo bán hàng. */
.lm-home-live-notice.is-alert { border: 3px solid #dc2626; }
.lm-home-live-notice.is-alert .lm-home-live-notice__label {
    display: inline-block; padding: 4px 12px; border-radius: 999px;
    background: #dc2626; color: #fff; font-weight: 800; letter-spacing: .04em;
}
.lm-home-live-notice.is-alert .lm-home-live-notice__title { color: #b91c1c; }
.lm-home-live-notice.is-alert .lm-home-live-notice__body { color: #1f2937; font-weight: 600; }
.lm-home-live-notice.is-alert .lm-home-live-notice__photo img { border: 1px solid #fecaca; }
.lm-home-live-notice.is-alert .lm-home-live-notice__cta { background: #dc2626; border-color: #dc2626; color: #fff; }
.lm-home-live-notice.is-alert .lm-home-live-notice__cta:hover { background: #b91c1c; border-color: #b91c1c; }
