/* Frontend-only compact notices. Kept separate from the admin notice system. */
.cms-frontend-notice-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    position: fixed;
    z-index: 1000000;
}

.cms-frontend-notice-stack.is-top-center {
    align-items: center;
    left: 16px;
    right: 16px;
    top: max(18px, env(safe-area-inset-top));
}

.cms-frontend-notice-stack.is-top-right {
    align-items: flex-end;
    right: max(18px, env(safe-area-inset-right));
    top: max(18px, env(safe-area-inset-top));
}

.cms-frontend-notice-stack.is-bottom-right {
    align-items: flex-end;
    bottom: max(18px, env(safe-area-inset-bottom));
    right: max(18px, env(safe-area-inset-right));
}

.cms-frontend-notice-stack.is-center-center {
    align-items: center;
    left: 16px;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.cms-frontend-notice {
    align-items: center;
    background: linear-gradient(135deg, rgba(20, 29, 47, 0.96), rgba(12, 18, 32, 0.94));
    border: 1px solid rgba(175, 194, 224, 0.18);
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(0, 4, 15, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    color: #f2f4f8;
    display: grid;
    gap: 11px;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    min-height: 70px;
    overflow: hidden;
    padding: 11px 12px 11px 14px;
    pointer-events: auto;
    position: relative;
    width: min(360px, calc(100vw - 32px));
}

.cms-frontend-notice:not(.has-gauge) {
    width: min(330px, calc(100vw - 32px));
}

.cms-frontend-notice.has-gauge {
    grid-template-columns: 30px minmax(0, 1fr) 62px 22px;
    gap: 9px;
    width: min(380px, calc(100vw - 32px));
}

.cms-frontend-notice::before {
    background: linear-gradient(90deg, transparent, rgba(226, 236, 255, 0.14), transparent);
    content: '';
    height: 1px;
    left: 18px;
    position: absolute;
    right: 18px;
    top: 0;
}

.cms-frontend-notice__icon {
    align-items: center;
    color: #a8bddb;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.cms-frontend-notice__icon svg {
    display: block;
    fill: none;
    height: 23px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 23px;
}

.cms-frontend-notice.is-success .cms-frontend-notice__icon { color: #9bd0b9; }
.cms-frontend-notice.is-info .cms-frontend-notice__icon { color: #a8bddb; }
.cms-frontend-notice.is-warning .cms-frontend-notice__icon { color: #e7c47c; }
.cms-frontend-notice.is-error .cms-frontend-notice__icon { color: #ef9f9d; }

.cms-frontend-notice__copy {
    min-width: 0;
}

.cms-frontend-notice__title,
.cms-frontend-notice__message {
    display: block;
    overflow-wrap: anywhere;
}

.cms-frontend-notice__title {
    color: #f2f4f8;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.cms-frontend-notice__message {
    color: #b3bbc9;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1.32;
    margin-top: 3px;
}

.cms-frontend-notice__dismiss {
    align-items: center;
    align-self: start;
    background: rgba(163, 180, 205, 0.11);
    border: 0;
    border-radius: 999px;
    color: #cbd4e2;
    cursor: pointer;
    display: inline-flex;
    height: 22px;
    justify-content: center;
    margin-top: 1px;
    padding: 0;
    width: 22px;
}

.cms-frontend-notice__dismiss:focus-visible,
.cms-frontend-notice__action:focus-visible {
    outline: 2px solid #bfd5ff;
    outline-offset: 2px;
}

.cms-frontend-notice__dismiss svg {
    fill: none;
    height: 13px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
    width: 13px;
}

.cms-frontend-notice__gauge {
    --cms-frontend-notice-metric: 0;
    align-items: center;
    background: conic-gradient(#ff665f calc(var(--cms-frontend-notice-metric) * 1%), #3d475a 0);
    border-radius: 50%;
    display: inline-flex;
    height: 62px;
    justify-content: center;
    position: relative;
    width: 62px;
}

.cms-frontend-notice__gauge::before {
    background: #172238;
    border: 1px solid rgba(181, 197, 220, 0.08);
    border-radius: inherit;
    content: '';
    inset: 6px;
    position: absolute;
}

.cms-frontend-notice__metric {
    color: #cdd3de;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    position: relative;
}

.cms-frontend-notice__action {
    background: rgba(188, 208, 239, 0.12);
    border: 1px solid rgba(188, 208, 239, 0.17);
    border-radius: 9px;
    color: #e1e9f8;
    cursor: pointer;
    font: 650 12px/1.1 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    padding: 8px 9px;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cms-frontend-notice-stack.is-top-right,
    .cms-frontend-notice-stack.is-bottom-right {
        left: 12px;
        right: 12px;
    }

    .cms-frontend-notice-stack.is-top-right,
    .cms-frontend-notice-stack.is-bottom-right {
        align-items: center;
    }

    .cms-frontend-notice-stack.is-top-center,
    .cms-frontend-notice-stack.is-center-center {
        left: 12px;
        right: 12px;
    }

    .cms-frontend-notice {
        border-radius: 18px;
        gap: 10px;
        min-height: 68px;
        padding: 11px 11px 11px 13px;
    }

    .cms-frontend-notice.has-gauge {
        grid-template-columns: 28px minmax(0, 1fr) 58px 22px;
    }

    .cms-frontend-notice__icon,
    .cms-frontend-notice__icon svg { height: 22px; width: 22px; }
    .cms-frontend-notice__gauge { height: 58px; width: 58px; }
}
