/* =========================================================================
   Design Lab notifications (designlab-notify.js → window.dlNotify)
   Replaces the #bookmarkToast / #rbBookmarkToast boxes. One fixed stack above
   everything: top-right under the header on desktop, top-centre on phones.
   ========================================================================= */

.dl-notify-region {
    position: fixed;
    top: var(--dl-notify-top, 96px);
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
    font-family: Manrope, system-ui, sans-serif;
}

/* #region Card */

.dl-notify {
    --dl-notify-accent: #003743;
    position: relative;
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: start;
    gap: 12px;
    width: 100%;
    padding: 14px 12px 16px 14px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e3e9e9;
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0, 34, 42, 0.16), 0 2px 6px rgba(0, 34, 42, 0.06);
    color: #0f0f0f;
    pointer-events: auto;
    transform-origin: top right;
    animation: dlNotifyIn 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
}

    .dl-notify.is-error {
        --dl-notify-accent: #9b1c1c;
    }

    .dl-notify.is-gold {
        --dl-notify-accent: #9c7233;
    }

.dl-notify__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--dl-notify-accent);
    color: #ffffff;
}

    .dl-notify.is-gold .dl-notify__icon {
        background: linear-gradient(135deg, #9c7233, #e6c88f 55%, #b88a44);
    }

    .dl-notify__icon svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.dl-notify__body {
    min-width: 0;
    padding-top: 1px;
}

.dl-notify__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--dl-notify-accent);
}

.dl-notify__text {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: #4f5b5d;
}

.dl-notify__action {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #003743;
    text-decoration: underline;
    text-underline-offset: 3px;
}

    .dl-notify__action:hover {
        color: #9c7233;
    }

.dl-notify__close {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin: -2px -2px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7b8789;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

    .dl-notify__close:hover,
    .dl-notify__close:focus-visible {
        background: #f1f4f4;
        color: #003743;
    }

/* Same notification fired again (e.g. bookmark toggled twice) */
.dl-notify.is-bumped {
    animation: dlNotifyBump 0.35s ease;
}

.dl-notify.is-leaving {
    animation: dlNotifyOut 0.35s ease forwards;
    pointer-events: none;
}

/* #endregion */

/* #region Phones: top-centre, slides down */

@media screen and (max-width: 767px) {
    .dl-notify-region {
        top: var(--dl-notify-top, 72px);
        right: 50%;
        transform: translateX(50%);
        align-items: stretch;
    }

    .dl-notify {
        transform-origin: top center;
        animation-name: dlNotifyInDown;
    }

        .dl-notify.is-leaving {
            animation-name: dlNotifyOutUp;
        }
}

/* #endregion */

@keyframes dlNotifyIn {
    from { opacity: 0; transform: translateX(28px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

@keyframes dlNotifyInDown {
    from { opacity: 0; transform: translateY(-18px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

@keyframes dlNotifyOut {
    to { opacity: 0; transform: translateX(28px) scale(0.97); }
}

@keyframes dlNotifyOutUp {
    to { opacity: 0; transform: translateY(-14px) scale(0.97); }
}

@keyframes dlNotifyBump {
    40% { transform: scale(1.025); }
}

@media (prefers-reduced-motion: reduce) {
    .dl-notify,
    .dl-notify.is-leaving,
    .dl-notify.is-bumped {
        animation-duration: 0.01ms;
    }
}

.dl-notify__body:not(:has(.dl-notify__text)):not(:has(.dl-notify__action)) {
    align-self: center;
}