/*
 * Developer: MexTech Limited
 * Licenced: IGN software is officially licenced and authorized to be used from MexTech Limited
 * Copyright: © 2026 All Rights Reserved, MexTech Limited (https://mextechltd.name.ng)
 */

/* Interface layer: notices, confirmation modal, password reveal. */

.notice-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 200;
    display: grid;
    gap: 8px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.notice {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 32px;
    gap: 10px;
    padding: 12px 12px 14px;
    background: var(--ink);
    color: var(--on-ink);
    border: 2px solid var(--ink);
    border-left: 6px solid var(--moss);
    box-shadow: 0 14px 30px rgba(15, 21, 18, 0.28);
    pointer-events: auto;
    overflow: hidden;
    animation: notice-in 0.32s var(--ease) both;
}

.notice[data-tone="error"] {
    border-left-color: var(--laterite);
}

.notice[data-tone="info"] {
    border-left-color: var(--bronze);
}

.notice.is-leaving {
    animation: notice-out 0.26s var(--ease) forwards;
}

.notice-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    background: var(--moss);
    color: var(--white);
}

.notice[data-tone="error"] .notice-mark {
    background: var(--laterite);
}

.notice[data-tone="info"] .notice-mark {
    background: var(--bronze);
    color: var(--ink);
}

.notice-mark svg {
    width: 15px;
    height: 15px;
}

.notice-copy {
    display: grid;
    gap: 3px;
    align-content: center;
}

.notice-kicker {
    font-family: var(--mono);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ochre);
}

.notice[data-tone="error"] .notice-kicker {
    color: #ffb59c;
}

.notice-message {
    font-size: 13px;
    line-height: 1.42;
    color: var(--on-ink);
}

.notice-dismiss {
    align-self: start;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1.5px solid rgba(240, 241, 235, 0.24);
    color: var(--on-ink-dim);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.notice-dismiss:hover {
    background: var(--laterite);
    border-color: var(--laterite);
    color: var(--white);
}

.notice-timer {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--ochre);
    transform-origin: 0 50%;
    animation: notice-timer 6s linear forwards;
}

.notice[data-tone="error"] .notice-timer {
    background: var(--laterite);
}

.notice[data-tone="info"] .notice-timer {
    background: var(--bronze);
}

.notice:hover .notice-timer,
.notice:focus-within .notice-timer {
    animation-play-state: paused;
}

.notice[data-notice-life] .notice-timer {
    animation-duration: 6s;
}

.ign-modal {
    position: fixed;
    inset: 0;
    z-index: 240;
    display: grid;
    place-items: center;
    padding: 20px;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    border: 0;
    background: transparent;
}

.ign-modal::backdrop {
    background: rgba(8, 12, 10, 0.72);
    backdrop-filter: blur(2px);
}

.ign-modal-panel {
    position: relative;
    width: min(480px, 100%);
    padding: 22px 22px 20px;
    background: var(--chalk);
    color: var(--text);
    border: 2px solid var(--ink);
    border-top: 10px solid var(--laterite);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.4);
    animation: modal-in 0.26s var(--ease) both;
}

.ign-modal-panel[data-tone="warning"] {
    border-top-color: var(--bronze);
}

.ign-modal-kicker {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--laterite);
    margin-bottom: 8px;
}

.ign-modal-title {
    font-family: var(--sans);
    font-weight: 900;
    font-size: clamp(21px, 3vw, 28px);
    line-height: 1;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.ign-modal-message {
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}

.ign-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.ign-btn {
    flex: 1 1 auto;
    min-height: 44px;
    padding: 11px 18px;
    border: 2px solid var(--ink);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.ign-btn-solid {
    background: var(--laterite);
    border-color: var(--laterite);
    color: var(--white);
}

.ign-btn-solid:hover {
    background: var(--ink);
    border-color: var(--ink);
}

.ign-btn-ghost {
    background: transparent;
    color: var(--ink);
}

.ign-btn-ghost:hover {
    background: var(--ink);
    color: var(--white);
}

@keyframes notice-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes notice-out {
    from {
        opacity: 1;
        transform: none;
    }

    to {
        opacity: 0;
        transform: translateX(18px);
    }
}

@keyframes notice-timer {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 760px) {
    .notice-stack {
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
    }

    .notice {
        padding: 10px 10px 13px;
        grid-template-columns: 30px minmax(0, 1fr) 28px;
    }

    .ign-modal {
        padding: 12px;
        align-items: end;
    }

    .ign-modal-panel {
        width: 100%;
        padding: 18px 16px 16px;
        border-top-width: 8px;
    }

    .ign-modal-actions {
        flex-direction: column-reverse;
    }

    .ign-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notice,
    .notice.is-leaving,
    .ign-modal-panel,
    .notice-timer {
        animation: none;
    }

    .notice-timer {
        display: none;
    }
}
