/* Shared alerts: loaded after desktop and mobile theme styles. */
.flash-toast-region {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 733px;
    max-width: 100%;
    margin: 0 auto 14px;
    pointer-events: none;
}

.flash-toast {
    --toast-accent: #268a5a;
    --toast-soft: #eaf7f0;
    --toast-border: #b9dfcb;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 6px 4px 6px 10px;
    color: #2a1c12;
    background: linear-gradient(90deg, var(--toast-soft) 0, #fff 42%);
    border: 1px solid var(--toast-border);
    border-left: 4px solid var(--toast-accent);
    border-radius: 4px;
    box-shadow: 0 8px 22px rgba(42, 28, 18, .08);
    pointer-events: auto;
    transition: opacity 180ms ease, transform 180ms ease;
}

.flash-toast-error { --toast-accent: #d64132; --toast-soft: #ffebe7; --toast-border: #efb8b1; }
.flash-toast-info { --toast-accent: #078d8c; --toast-soft: #e5f7f6; --toast-border: #b4dfdd; }
.flash-toast-warning { --toast-accent: #d89b22; --toast-soft: #fff4d9; --toast-border: #ead39b; }

.flash-toast-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: var(--toast-accent);
    background: var(--toast-soft);
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
}

.flash-toast-message {
    min-width: 0;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.flash-toast-message a { color: var(--toast-accent); font-weight: 700; }
.flash-toast-message strong,
.flash-toast-message span { display: block; }
.flash-toast-action { margin-top: 3px; text-decoration: none; }
.flash-toast-action:hover { text-decoration: underline; }

.flash-toast-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #7a6e64;
    background: transparent;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
}

.flash-toast-close:hover,
.flash-toast-close:focus-visible {
    color: #2a1c12;
    background: #f2f0ec;
}

.flash-toast.is-hiding { opacity: 0; transform: translateY(-6px); }

.account-warnings {
    display: grid;
    gap: 12px;
    margin: 0 0 12px;
}

.account-content-main > .flash-toast-region {
    margin-bottom: 12px;
}

.account-content-main > .flash-toast-region + .account-overview {
    padding-top: 0;
}

@media (min-width: 768px) {
    .account-content-main > .flash-toast-region {
        width: 733px;
        max-width: 100%;
        margin-bottom: 16px;
        margin-right: auto;
        margin-left: auto;
    }

    .account-content-main > .flash-toast-region + .account-overview {
        padding-top: 0;
    }

    .account-warnings {
        gap: 16px;
        margin-bottom: 16px;
    }
}

.account-notice {
    --notice-accent: #d89b22;
    --notice-soft: #fff4d9;
    --notice-action-border: #dfbd73;
    --notice-action-hover: #f5dfaa;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 9px 8px 9px 12px;
    color: #33271f;
    background: #fffaf0;
    border: 1px solid #ead9b4;
    border-left: 4px solid var(--notice-accent);
    border-radius: 4px;
}

.account-notice-danger {
    --notice-accent: #d64132;
    --notice-soft: #ffebe7;
    --notice-action-border: #e9a89e;
    --notice-action-hover: #f5c9c2;
    background: #fff7f5;
    border-color: #efc4bd;
}

.account-notice-info {
    --notice-accent: #078d8c;
    --notice-soft: #e5f7f6;
    --notice-action-border: #8dcfcb;
    --notice-action-hover: #c8ebe8;
    background: #f5fcfb;
    border-color: #b9dfdc;
}

.account-notice-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--notice-accent);
    background: var(--notice-soft);
    border-radius: 50%;
    font-size: 21px;
}

.account-notice-content {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.account-notice-title {
    color: #251b15;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.account-notice-message {
    color: #725f50;
    font-size: 13px;
    line-height: 1.45;
}

.account-notice-action {
    display: inline;
    margin-left: 5px;
    padding: 0;
    color: var(--notice-accent);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: inherit;
    font-weight: 700;
    line-height: inherit;
    text-decoration: underline;
    white-space: nowrap;
}

.account-notice-action:hover {
    color: #251b15;
    background: transparent;
    text-decoration: underline;
}

.account-notice-close {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #89796b;
    background: transparent;
    border: 0;
    border-radius: 3px;
    font-size: 19px;
    cursor: pointer;
}

.account-notice-close:hover {
    color: #2b211a;
    background: rgba(50, 35, 25, .06);
}

.account-notice-action:focus-visible,
.account-notice-close:focus-visible {
    outline: 2px solid #078d8c;
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    .flash-toast-region,
    .m-content > .flash-toast-region {
        width: 100%;
        max-width: 100%;
        margin: 8px 0 10px;
        align-self: stretch;
    }

    .flash-toast {
        width: 100%;
        box-sizing: border-box;
        grid-template-columns: 30px minmax(0, 1fr) 34px;
        gap: 6px;
        min-height: 52px;
        padding: 6px 0 6px 8px;
        background: var(--toast-soft);
        border-width: 0 0 1px 3px;
        border-radius: 0;
        box-shadow: none;
    }

    .flash-toast-icon {
        width: 32px;
        height: 32px;
        background: transparent;
        font-size: 18px;
    }

    .flash-toast-message { font-size: 13px; line-height: 1.35; }
    .flash-toast-close {
        align-self: start;
        width: 34px;
        height: 34px;
        margin-top: -2px;
    }

    .account-overview .account-warnings {
        gap: 0;
        margin: 0 0 10px;
    }

    .account-overview .account-notice {
        grid-template-columns: 30px minmax(0, 1fr) 34px;
        gap: 2px 7px;
        align-items: start;
        padding: 8px 0 8px 8px;
        background: var(--notice-soft);
        border-width: 0 0 1px 3px;
        border-radius: 0;
    }

    .account-notice-icon {
        width: 30px;
        height: 30px;
        background: transparent;
        font-size: 17px;
    }

    .account-notice-title { font-size: 13px; line-height: 1.3; }
    .account-notice-message { font-size: 12px; line-height: 1.35; }

    .account-notice-action {
        display: inline;
        margin-left: 4px;
        padding: 0;
        color: var(--notice-accent);
        background: transparent;
        border: 0;
        border-radius: 0;
        font-size: inherit;
        text-decoration: underline;
        white-space: nowrap;
    }

    .account-notice-action:hover {
        color: #251b15;
        background: transparent;
        text-decoration: underline;
    }

    .account-notice-close {
        grid-column: 3;
        grid-row: 1;
        align-self: start;
        width: 34px;
        height: 34px;
        margin-top: -5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .flash-toast,
    .account-notice-action,
    .account-notice-close { transition: none; }
}
