/* Shared Dream Realism notifications */
:root {
    --dream-toast-surface: rgba(13, 12, 15, 0.58);
    --dream-toast-border: rgba(255, 255, 255, 0.11);
    --dream-toast-title: rgba(255, 255, 255, 0.96);
    --dream-toast-copy: rgba(255, 255, 255, 0.58);
}

.site-toast-stack,
#toast-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 4000;
    width: min(340px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 9px;
    pointer-events: none;
}

.site-toast,
#toast-container .toast,
.cancel-toast,
.dl-toast {
    --toast-accent: 218, 218, 222;
    width: min(340px, calc(100vw - 32px));
    min-width: 0;
    min-height: 78px;
    padding: 0;
    position: relative;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--dream-toast-border);
    border-radius: 16px;
    background: var(--dream-toast-surface);
    color: var(--dream-toast-title);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
    backdrop-filter: blur(22px) saturate(135%);
    font-family: "Geist", Arial, sans-serif;
    pointer-events: auto;
}

.cancel-toast {
    grid-template-columns: 62px minmax(0, 1fr) 38px;
}

.site-toast[data-type="success"],
#toast-container .toast.success,
.cancel-toast.success,
.dl-toast {
    --toast-accent: 183, 222, 195;
}

.site-toast[data-type="error"],
#toast-container .toast.error,
.cancel-toast.error {
    --toast-accent: 239, 176, 143;
}

.site-toast[data-type="warning"],
#toast-container .toast.warning {
    --toast-accent: 233, 200, 107;
}

.site-toast-icon,
#toast-container .toast-icon,
.cancel-toast-icon,
.dl-toast-icon {
    width: 62px;
    height: 100%;
    min-height: 78px;
    display: grid;
    place-items: center;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    background: rgba(var(--toast-accent), 0.045);
    color: rgb(var(--toast-accent));
}

.site-toast-icon span,
#toast-container .toast-icon span,
.cancel-toast-icon span,
.dl-toast-icon span {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(var(--toast-accent), 0.72);
    border-radius: 50%;
    background: rgba(var(--toast-accent), 0.09);
    color: rgb(var(--toast-accent));
    box-shadow: 0 0 18px rgba(var(--toast-accent), 0.16);
    font-family: "Geist", Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.site-toast-content,
#toast-container .toast-body,
.cancel-toast-text,
.dl-toast-text {
    min-width: 0;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-toast-title,
#toast-container .toast-title,
.cancel-toast-title,
.dl-toast-title {
    margin: 0 0 3px;
    color: var(--dream-toast-title);
    font-family: "Albert Sans", "Geist", Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-transform: none;
}

.site-toast-message,
#toast-container .toast-msg,
.cancel-toast-message,
.dl-toast-name {
    margin: 0;
    color: var(--dream-toast-copy);
    font-family: "Geist", Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
}

/* Expanding-circle interaction shared by every notification type */
.site-toast,
#toast-container .toast,
.cancel-toast,
.dl-toast {
    isolation: isolate;
}

.site-toast-icon,
#toast-container .toast-icon,
.cancel-toast-icon,
.dl-toast-icon {
    position: relative;
    z-index: 2;
    overflow: visible;
}

.site-toast-icon::before,
#toast-container .toast-icon::before,
.cancel-toast-icon::before,
.dl-toast-icon::before {
    content: "";
    width: 25px;
    height: 25px;
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    border-radius: 9999px;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.82);
    transform-origin: center;
    transition: opacity 0.12s ease, transform 0.56s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-toast-icon > *,
#toast-container .toast-icon > *,
.cancel-toast-icon > *,
.dl-toast-icon > * {
    position: relative;
    z-index: 2;
    transition: color 0.48s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.48s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.48s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.48s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.48s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-toast-content,
#toast-container .toast-body,
.cancel-toast-text,
.dl-toast-text,
.cancel-toast-close {
    position: relative;
    z-index: 3;
}

.site-toast-title,
.site-toast-message,
#toast-container .toast-title,
#toast-container .toast-msg,
.cancel-toast-title,
.cancel-toast-message,
.dl-toast-title,
.dl-toast-name,
.cancel-toast-close {
    transition: color 0.48s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.48s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-toast:hover .site-toast-icon::before,
.site-toast:focus-visible .site-toast-icon::before,
#toast-container .toast:hover .toast-icon::before,
#toast-container .toast:focus-within .toast-icon::before,
.cancel-toast:hover .cancel-toast-icon::before,
.cancel-toast:focus-within .cancel-toast-icon::before,
.dl-toast:hover .dl-toast-icon::before,
.dl-toast:focus-within .dl-toast-icon::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(28);
}

.site-toast:hover .site-toast-icon span,
.site-toast:focus-visible .site-toast-icon span,
#toast-container .toast:hover .toast-icon span,
#toast-container .toast:focus-within .toast-icon span,
.dl-toast:hover .dl-toast-icon span,
.dl-toast:focus-within .dl-toast-icon span {
    border-color: rgba(0, 0, 0, 0.18);
    background: transparent;
    color: rgba(0, 0, 0, 0.76);
    box-shadow: none;
    transform: scale(1.12);
}

.cancel-toast:hover .cancel-toast-icon,
.cancel-toast:focus-within .cancel-toast-icon {
    color: rgba(0, 0, 0, 0.76);
}

.site-toast:hover .site-toast-title,
.site-toast:focus-visible .site-toast-title,
#toast-container .toast:hover .toast-title,
#toast-container .toast:focus-within .toast-title,
.cancel-toast:hover .cancel-toast-title,
.cancel-toast:focus-within .cancel-toast-title,
.dl-toast:hover .dl-toast-title,
.dl-toast:focus-within .dl-toast-title {
    color: #202020;
}

.site-toast:hover .site-toast-message,
.site-toast:focus-visible .site-toast-message,
#toast-container .toast:hover .toast-msg,
#toast-container .toast:focus-within .toast-msg,
.cancel-toast:hover .cancel-toast-message,
.cancel-toast:focus-within .cancel-toast-message,
.dl-toast:hover .dl-toast-name,
.dl-toast:focus-within .dl-toast-name {
    color: rgba(0, 0, 0, 0.58);
}

.cancel-toast:hover .cancel-toast-close,
.cancel-toast:focus-within .cancel-toast-close {
    color: rgba(0, 0, 0, 0.64);
    background: rgba(0, 0, 0, 0.06);
}

#toast-container .toast:hover .toast-progress,
#toast-container .toast:focus-within .toast-progress {
    background: rgba(0, 0, 0, 0.28);
}

/* Play the status fill automatically when a notification appears */
.site-toast .site-toast-icon::before,
#toast-container .toast .toast-icon::before,
.cancel-toast.show .cancel-toast-icon::before,
.dl-toast.show .dl-toast-icon::before {
    animation: dreamNotificationAutoFill 0.56s cubic-bezier(0.16, 1, 0.3, 1) 0.16s forwards;
}

.site-toast .site-toast-icon > *,
#toast-container .toast .toast-icon > *,
.cancel-toast.show .cancel-toast-icon > *,
.dl-toast.show .dl-toast-icon > * {
    animation: dreamNotificationAutoIcon 0.48s cubic-bezier(0.16, 1, 0.3, 1) 0.24s forwards;
}

.site-toast .site-toast-title,
#toast-container .toast .toast-title,
.cancel-toast.show .cancel-toast-title,
.dl-toast.show .dl-toast-title {
    animation: dreamNotificationAutoTitle 0.48s cubic-bezier(0.16, 1, 0.3, 1) 0.24s forwards;
}

.site-toast .site-toast-message,
#toast-container .toast .toast-msg,
.cancel-toast.show .cancel-toast-message,
.dl-toast.show .dl-toast-name {
    animation: dreamNotificationAutoCopy 0.48s cubic-bezier(0.16, 1, 0.3, 1) 0.27s forwards;
}

.cancel-toast.show .cancel-toast-close {
    animation: dreamNotificationAutoClose 0.48s cubic-bezier(0.16, 1, 0.3, 1) 0.27s forwards;
}

.site-toast {
    animation: dreamSiteToastIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    cursor: pointer;
}

.site-toast.is-leaving,
#toast-container .toast.out {
    pointer-events: none;
    animation: dreamSiteToastOut 0.48s cubic-bezier(0.4, 0, 0.2, 1) both;
}

#toast-container .toast {
    animation: dreamSiteToastIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#toast-container .toast-progress {
    height: 1px;
    right: 0;
    bottom: 0;
    left: 62px;
    background: rgba(var(--toast-accent), 0.46);
}

@keyframes dreamSiteToastIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes dreamSiteToastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(calc(100% + 48px)); }
}

@keyframes dreamNotificationAutoFill {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.82); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(28); }
}

@keyframes dreamNotificationAutoIcon {
    0% {
        color: rgb(var(--toast-accent));
        border-color: rgba(var(--toast-accent), 0.72);
        background-color: rgba(var(--toast-accent), 0.09);
        box-shadow: 0 0 18px rgba(var(--toast-accent), 0.16);
        transform: scale(1);
    }
    100% {
        color: rgba(0, 0, 0, 0.76);
        border-color: rgba(0, 0, 0, 0.18);
        background-color: transparent;
        box-shadow: none;
        transform: scale(1.12);
    }
}

@keyframes dreamNotificationAutoTitle {
    from { color: var(--dream-toast-title); }
    to { color: #202020; }
}

@keyframes dreamNotificationAutoCopy {
    from { color: var(--dream-toast-copy); }
    to { color: rgba(0, 0, 0, 0.58); }
}

@keyframes dreamNotificationAutoClose {
    from { color: rgba(255, 255, 255, 0.58); background-color: transparent; }
    to { color: rgba(0, 0, 0, 0.64); background-color: rgba(0, 0, 0, 0.06); }
}

@media (max-width: 560px) {
    .site-toast-stack,
    #toast-container {
        right: 16px;
        bottom: 16px;
        left: 16px;
        width: auto;
    }

    .site-toast,
    #toast-container .toast,
    .cancel-toast,
    .dl-toast {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-toast,
    .site-toast.is-leaving,
    #toast-container .toast,
    #toast-container .toast.out {
        animation-duration: 0.01ms;
    }

    .site-toast-icon::before,
    #toast-container .toast-icon::before,
    .cancel-toast-icon::before,
    .dl-toast-icon::before,
    .site-toast-icon > *,
    #toast-container .toast-icon > *,
    .cancel-toast-icon > *,
    .dl-toast-icon > * {
        transition-duration: 0.01ms;
        animation-duration: 0.01ms;
        animation-delay: 0ms;
    }

    .site-toast-icon::before,
    #toast-container .toast-icon::before,
    .cancel-toast.show .cancel-toast-icon::before,
    .dl-toast.show .dl-toast-icon::before,
    .site-toast-title,
    .site-toast-message,
    #toast-container .toast-title,
    #toast-container .toast-msg,
    .cancel-toast.show .cancel-toast-title,
    .cancel-toast.show .cancel-toast-message,
    .dl-toast.show .dl-toast-title,
    .dl-toast.show .dl-toast-name {
        animation-duration: 0.01ms;
        animation-delay: 0ms;
    }
}
