/* ======================================================
   ENTERPRISE ANNOUNCEMENT MODAL — ABSOLUTE TOP LAYER
   - Cannot hide under navbar
   - Cannot hide under status bar
   - Breaks stacking context issues
   - Mobile safe
   - Production ready
====================================================== */

/* ================= ROOT VARIABLES ================= */

:root {
    --primary: #6d5dfc;
    --primary-2: #7c3aed;
    --dark: #0f172a;
    --muted: #64748b;
    --border: rgba(148, 163, 184, 0.25);
    --surface: #ffffff;
    --surface-2: #f8fafc;
}

/* ======================================================
   FORCE MODAL OUTSIDE ALL STACKING CONTEXTS
====================================================== */

#announcementRoot {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;

    /* EXTREME z-index */
    z-index: 2147483647 !important;

    /* Break stacking context issues */
    isolation: isolate !important;
    transform: none !important;
    filter: none !important;
    will-change: auto !important;

    pointer-events: none;
}

/* ======================================================
   OVERLAY
====================================================== */

.announcement-overlay {
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    height: 100vh !important;

    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    transition: opacity .3s ease;

    pointer-events: auto;

    z-index: 2147483647 !important;
}

.announcement-overlay.active {
    opacity: 1;
}

/* ======================================================
   MODAL CARD
====================================================== */

.announcement-wrapper {
    width: 520px;
    max-width: 92%;

    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);

    box-shadow:
        0 50px 140px rgba(0,0,0,0.35),
        0 15px 60px rgba(0,0,0,0.15);

    transform: translateY(40px) scale(.95);
    opacity: 0;

    transition:
        transform .35s cubic-bezier(.16,.8,.28,1),
        opacity .3s ease;

    overflow: hidden;

    z-index: 2147483647 !important;
}

.announcement-wrapper.active {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ======================================================
   HEADER
====================================================== */

.announcement-header {
    padding: 22px 26px;

    display: flex;
    align-items: center;
    gap: 14px;

    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;

    position: relative;
}

.announcement-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(255,255,255,0.18), transparent 60%);
    pointer-events: none;
}

.announcement-icon {
    width: 46px;
    height: 46px;

    background: rgba(255,255,255,0.15);
    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    flex-shrink: 0;

    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}

.announcement-title-area h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.2;
}

.announcement-title-area span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}

/* CLOSE BUTTON */

.announcement-close {
    margin-left: auto;

    width: 40px;
    height: 40px;

    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.25);

    background: rgba(255,255,255,0.15);
    color: #fff;

    display: grid;
    place-items: center;

    cursor: pointer;
    transition: all .2s ease;

    z-index: 2;
}

.announcement-close:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.25);
}

/* ======================================================
   BODY
====================================================== */

.announcement-body {
    padding: 26px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--dark);
    background: var(--surface);
}

.announcement-message {
    margin-bottom: 18px;
    color: #1f2937;
}

/* HIGHLIGHTS */

.announcement-highlights {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 14px;

    background: var(--surface-2);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;

    font-size: 14px;
    color: #334155;

    transition: all .2s ease;
}

.highlight-item:hover {
    background: rgba(109, 93, 252, 0.08);
    transform: translateX(5px);
}

.highlight-item i {
    color: var(--primary);
    font-size: 16px;
}

/* ======================================================
   FOOTER
====================================================== */

.announcement-footer {
    padding: 20px 26px;

    background: var(--surface-2);
    border-top: 1px solid rgba(148, 163, 184, 0.18);

    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* BUTTONS */

.announcement-primary-btn,
.announcement-secondary-btn {
    padding: 10px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    text-decoration: none;
    transition: all .25s ease;
}

/* Primary */

.announcement-primary-btn {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 14px 30px rgba(109,93,252,0.35);
}

.announcement-primary-btn:hover {
    transform: translateY(-2px);
    background: #5d4ff0;
    box-shadow: 0 18px 40px rgba(109,93,252,0.45);
}

/* Secondary */

.announcement-secondary-btn {
    background: #111827;
    color: #fff;
}

.announcement-secondary-btn:hover {
    transform: translateY(-2px);
    opacity: .92;
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 991px) {
    .announcement-wrapper {
        width: 460px;
    }
}

@media (max-width: 576px) {

    .announcement-wrapper {
        width: 94%;
        border-radius: 18px;
    }

    .announcement-header {
        padding: 20px;
    }

    .announcement-body {
        padding: 22px 20px;
        font-size: 14px;
    }

    .announcement-footer {
        padding: 18px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .announcement-primary-btn,
    .announcement-secondary-btn {
        width: 100%;
    }
}

/* ======================================================
   OPTIONAL SAFETY: LOWER NAVBAR LAYER
   (Uncomment ONLY if needed)
====================================================== */

/*
header,
.navbar,
.topbar,
.status-bar {
    z-index: 1 !important;
}
*/