/*
 * Shared compact notification toast.
 * Loaded after page-specific styles so every web console uses the same
 * predictable footprint without covering the primary workspace.
 */
html body .flash {
    position: fixed !important;
    z-index: 15000 !important;
    top: max(14px, env(safe-area-inset-top)) !important;
    right: max(14px, env(safe-area-inset-right)) !important;
    bottom: auto !important;
    left: auto !important;
    display: grid !important;
    grid-template-columns: 32px minmax(0, 1fr) 28px !important;
    align-items: start !important;
    gap: 9px !important;
    width: min(360px, calc(100vw - 28px)) !important;
    min-width: 0 !important;
    max-width: 360px !important;
    max-height: min(124px, calc(100vh - 28px)) !important;
    margin: 0 !important;
    padding: 9px !important;
    overflow: hidden !important;
    color: #122033 !important;
    border: 1px solid #cbd7e6 !important;
    border-radius: 13px !important;
    background: #ffffff !important;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.18) !important;
    font-size: 0.78rem !important;
    font-weight: 650 !important;
    line-height: 1.35 !important;
    text-align: left !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    transform: none !important;
    transition: opacity 180ms ease, transform 180ms ease !important;
}

html body .flash.success {
    border-color: #8bd9c9 !important;
    background: #f2fcf9 !important;
}

html body .flash.error {
    border-color: #f1aaa8 !important;
    background: #fff7f6 !important;
}

html body .flash.info {
    border-color: #b9cdf2 !important;
    background: #f6f9ff !important;
}

html body .flash-icon {
    display: grid !important;
    place-items: center !important;
    width: 32px !important;
    height: 32px !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    background: #15836f !important;
}

html body .flash.error .flash-icon {
    background: #c8272c !important;
}

html body .flash.info .flash-icon {
    background: #2864c7 !important;
}

html body .flash-icon::before,
html body .flash::before {
    content: none !important;
    display: none !important;
}

html body .flash-icon .app-icon {
    width: 17px !important;
    height: 17px !important;
    stroke-width: 2.2 !important;
}

html body .flash-copy {
    display: grid !important;
    min-width: 0 !important;
    gap: 1px !important;
    padding: 1px 0 !important;
}

html body .flash-title {
    color: #53657c !important;
    font-size: 0.62rem !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.055em !important;
    text-transform: uppercase !important;
}

html body .flash-message {
    display: -webkit-box !important;
    min-width: 0 !important;
    max-height: 4.05em !important;
    overflow: hidden !important;
    color: #122033 !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
}

html body .flash-dismiss {
    display: grid !important;
    place-items: center !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #5c6c80 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    font: 700 1.15rem/1 Arial, sans-serif !important;
    cursor: pointer !important;
}

html body .flash-dismiss:hover,
html body .flash-dismiss:focus-visible {
    color: #101828 !important;
    background: rgba(15, 23, 42, 0.08) !important;
    outline: none !important;
}

html body .flash.is-hiding {
    opacity: 0 !important;
    transform: translateY(-8px) !important;
    pointer-events: none !important;
}

/* Keep workstation notifications clear of its persistent command bar. */
html body.tech-page .flash {
    top: max(82px, calc(env(safe-area-inset-top) + 80px)) !important;
}

@media (max-width: 620px) {
    html body .flash {
        top: max(10px, env(safe-area-inset-top)) !important;
        right: 10px !important;
        width: calc(100vw - 20px) !important;
        max-width: none !important;
        max-height: min(116px, calc(100vh - 20px)) !important;
    }

    html body.pp-public-page .flash,
    html body.pp-onboarding-page .flash {
        top: max(72px, calc(env(safe-area-inset-top) + 68px)) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body .flash {
        transition: opacity 1ms linear !important;
    }
}
