/* Shared component import order:
   foundations -> detail workspaces -> tables -> cards/tooltips -> reporting -> overlays */

@import url("components/foundations.css");
@import url("components/detail.css");
@import url("components/tables.css");
@import url("components/cards.css");
@import url("components/reporting.css");
@import url("components/overlays.css");

.realhub-toast-region {
    position: fixed;
    top: 5.35rem;
    right: 1.15rem;
    z-index: 1200;
    display: grid;
    gap: 0.75rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.realhub-toast {
    position: relative;
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 2.8rem 0.95rem 1rem;
    border: 1px solid var(--line);
    border-left-width: 0.28rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: realhub-toast-enter 0.18s ease-out;
}

.realhub-toast--success {
    border-color: var(--mint-border);
    border-left-color: #2f8a51;
}

.realhub-toast--error {
    border-color: var(--rose-border);
    border-left-color: #b53030;
}

.realhub-toast--info {
    border-color: var(--sky-border);
    border-left-color: var(--blue);
}

.realhub-toast--warning {
    border-color: #f0c7bf;
    border-left-color: var(--copper);
}

.realhub-toast__title {
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
}

.realhub-toast__message {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.35;
}

.realhub-toast__close {
    position: absolute;
    top: 0.62rem;
    right: 0.62rem;
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.realhub-toast__close::before,
.realhub-toast__close::after {
    content: "";
    position: absolute;
    width: 0.78rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.realhub-toast__close::before {
    transform: rotate(45deg);
}

.realhub-toast__close::after {
    transform: rotate(-45deg);
}

.realhub-toast__close:hover,
.realhub-toast__close:focus-visible {
    border-color: var(--line);
    color: var(--navy);
    outline: none;
}

[data-grid-region].is-loading {
    opacity: 0.76;
    transition: opacity 0.16s ease;
}

@keyframes realhub-toast-enter {
    from {
        opacity: 0;
        transform: translateY(-0.35rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
