/* =======================================================================
   eBuy UI Overlays — Toast Stack + Confirm Dialog
   ======================================================================= */

/* -----------------------------------------------------------------------
   Toast Container
   ----------------------------------------------------------------------- */
#eb-toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    display: flex;
    flex-direction: column-reverse;   /* newest at bottom, older slide up */
    gap: 0.55rem;
    z-index: 10500;
    pointer-events: none;
    max-width: min(360px, calc(100vw - 2.5rem));
}

/* -----------------------------------------------------------------------
   Toast Item
   ----------------------------------------------------------------------- */
.eb-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-radius: 0.6rem;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.16), 0 1px 4px rgba(15, 23, 42, 0.1);
    pointer-events: all;

    /* entrance: start shifted + transparent */
    opacity: 0;
    transform: translateX(1.5rem);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.eb-toast--visible {
    opacity: 1;
    transform: translateX(0);
}

/* Variant colours */
.eb-toast--success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.eb-toast--error {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}
.eb-toast--info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.eb-toast--warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.eb-toast__icon {
    flex-shrink: 0;
    margin-top: 0.05rem;
    display: flex;
    align-items: center;
}

.eb-toast__msg {
    flex: 1;
}

.eb-toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.55;
    display: flex;
    align-items: center;
    color: inherit;
    margin-top: 0.05rem;
    transition: opacity 0.15s;
}
.eb-toast__close:hover { opacity: 1; }

/* -----------------------------------------------------------------------
   Confirm Dialog Overlay
   ----------------------------------------------------------------------- */
#eb-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 10600;
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

#eb-confirm-overlay.eb-confirm--visible {
    opacity: 1;
    pointer-events: all;
}

#eb-confirm-dialog {
    background: #fff;
    border-radius: 0.85rem;
    padding: 1.5rem 1.5rem 1.25rem;
    max-width: 360px;
    width: calc(100vw - 2rem);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);

    transform: scale(0.94) translateY(0.5rem);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#eb-confirm-dialog.eb-confirm__dialog--in {
    transform: scale(1) translateY(0);
}

.eb-confirm__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.35rem;
}

.eb-confirm__msg {
    font-size: 0.84rem;
    color: #64748b;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.eb-confirm__msg:empty {
    display: none;
}

.eb-confirm__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
