/* =========================================================
   RC TOAST (Dark tinted like your screenshot)
   - Left icon block
   - Right close square
   - Dark tinted backgrounds per type
   ========================================================= */

:root {
    --rc-toast-w: min(560px, calc(100vw - 24px));
    --rc-toast-radius: 6px;
    --rc-toast-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);

    --rc-toast-text: rgba(255, 255, 255, 0.92);
    --rc-toast-muted: rgba(255, 255, 255, 0.65);

    --rc-toast-close-bg: rgba(255, 255, 255, 0.12);
    --rc-toast-close-bg-hover: rgba(255, 255, 255, 0.18);
    --rc-toast-close-text: rgba(255, 255, 255, 0.65);

    /* type colors (icon block) */
    --rc-error: #ef4444;
    --rc-warning: #f59e0b;
    --rc-success: #22c55e;
    --rc-info: #3b82f6;

    /* tinted backgrounds (main bar) */
    --rc-bg-error: rgba(60, 10, 10, 0.92);
    --rc-bg-warning: rgba(55, 45, 10, 0.92);
    --rc-bg-success: rgba(10, 45, 20, 0.92);
    --rc-bg-info: rgba(8, 30, 60, 0.92);
}

/* zone */
#rcToastZone.rc-toast-zone {
    position: fixed;
    z-index: 99999;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: var(--rc-toast-w);

    display: flex;
    flex-direction: column;
    gap: 10px;

    pointer-events: none;
}

@media (max-width: 576px) {
    #rcToastZone.rc-toast-zone {
        bottom: 14px;
        left: 12px;
        right: 12px;
        transform: none;
        width: auto;
    }
}

/* toast item */
.rc-toast {
    pointer-events: auto;
    position: relative;
    border-radius: var(--rc-toast-radius);
    box-shadow: var(--rc-toast-shadow);
    overflow: hidden;

    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;

    min-height: 56px;

    transform: translateY(-8px);
    opacity: 0;
    animation: rcToastIn 180ms ease forwards;
}

@keyframes rcToastIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.rc-toast.is-leaving {
    animation: rcToastOut 160ms ease forwards;
}

@keyframes rcToastOut {
    to {
        transform: translateY(-8px);
        opacity: 0;
    }
}

/* left icon block */
.rc-toast__icon {
    width: 44px;
    height: 100%;
    display: grid;
    place-items: center;
}

.rc-toast__icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* message */
.rc-toast__body {
    padding: 10px 12px;
    min-width: 0;
}

.rc-toast__message {
    margin: 0;
    color: var(--rc-toast-text);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* close button (right square) */
.rc-toast__close {
    width: 34px;
    height: 34px;
    margin-right: 10px;

    border: 0;
    border-radius: 4px;
    background: var(--rc-toast-close-bg);
    color: var(--rc-toast-close-text);

    display: grid;
    place-items: center;

    cursor: pointer;
    transition: 0.15s ease;
}

.rc-toast__close:hover {
    background: var(--rc-toast-close-bg-hover);
    color: rgba(255, 255, 255, 0.85);
}

.rc-toast__close svg {
    width: 16px;
    height: 16px;
}

/* optional: subtle top highlight line */
.rc-toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 2px;
    opacity: 0.35;
    background: rgba(255, 255, 255, 0.55);
}

/* progress bar (bottom) */
.rc-toast__progress {
    position: absolute;
    left: 44px; /* start after icon block */
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.12);
}

.rc-toast__progress > i {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: left;
    background: rgba(255, 255, 255, 0.28);
    animation: rcToastProgress linear forwards;
}

@keyframes rcToastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* =========================================================
   VARIANTS
   ========================================================= */
.rc-toast--error {
    background: var(--rc-bg-error);
}
.rc-toast--error .rc-toast__icon {
    background: var(--rc-error);
}

.rc-toast--warning {
    background: var(--rc-bg-warning);
}
.rc-toast--warning .rc-toast__icon {
    background: var(--rc-warning);
}

.rc-toast--success {
    background: var(--rc-bg-success);
}
.rc-toast--success .rc-toast__icon {
    background: var(--rc-success);
}

.rc-toast--info {
    background: var(--rc-bg-info);
}
.rc-toast--info .rc-toast__icon {
    background: var(--rc-info);
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
    .rc-toast {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .rc-toast.is-leaving {
        animation: none;
        opacity: 0;
    }
    .rc-toast__progress > i {
        animation: none;
        transform: scaleX(0);
    }
}
