:root {
    --uni-toast-bg: #ffffff;
    --uni-toast-border: #e7e2ec;
    --uni-toast-text: #25212a;
    --uni-toast-muted: #686170;
    --uni-toast-shadow: 0 18px 45px rgba(35, 26, 45, 0.16), 0 4px 12px rgba(35, 26, 45, 0.08);
}

#toast-container {
    pointer-events: none;
    z-index: 11000;
}

#toast-container.toast-top-right {
    right: 1.25rem;
    top: 1.25rem;
}

.layout-fixed #toast-container.toast-top-right {
    top: 4.5rem;
}

#toast-container > .toast {
    --uni-toast-accent: #7442c8;
    --uni-toast-icon-bg: #f2ebfc;
    background-color: var(--uni-toast-bg) !important;
    background-image: none !important;
    border: 1px solid var(--uni-toast-border);
    border-left: 4px solid var(--uni-toast-accent);
    border-radius: 14px;
    box-shadow: var(--uni-toast-shadow);
    color: var(--uni-toast-text);
    margin: 0 0 0.75rem;
    min-height: 88px;
    opacity: 1;
    overflow: hidden;
    padding: 1.05rem 3.25rem 1.05rem 4.35rem;
    position: relative;
    transition: box-shadow 160ms ease, transform 160ms ease;
    width: min(390px, calc(100vw - 2.5rem));
}

#toast-container > .toast:hover {
    box-shadow: 0 22px 52px rgba(35, 26, 45, 0.2), 0 5px 14px rgba(35, 26, 45, 0.1);
    opacity: 1;
    transform: translateY(-1px);
}

#toast-container > .toast::before {
    align-items: center;
    background: var(--uni-toast-icon-bg);
    border-radius: 11px;
    color: var(--uni-toast-accent);
    content: "i";
    display: flex;
    font-size: 1.1rem;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    left: 1rem;
    line-height: 1;
    position: absolute;
    top: 1rem;
    width: 38px;
}

#toast-container > .toast-success {
    --uni-toast-accent: #168a48;
    --uni-toast-icon-bg: #e8f7ee;
}

#toast-container > .toast-success::before {
    content: "\2713";
}

#toast-container > .toast-error {
    --uni-toast-accent: #d92f4f;
    --uni-toast-icon-bg: #fdecef;
}

#toast-container > .toast-error::before {
    content: "\00D7";
    font-size: 1.45rem;
}

#toast-container > .toast-warning {
    --uni-toast-accent: #c57908;
    --uni-toast-icon-bg: #fff4df;
}

#toast-container > .toast-warning::before {
    content: "!";
}

#toast-container > .toast-info {
    --uni-toast-accent: #6f42c1;
    --uni-toast-icon-bg: #f1eafa;
}

#toast-container .toast-title {
    color: var(--uni-toast-text);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.25;
    margin: 0 0 0.28rem;
    padding-right: 0.25rem;
}

#toast-container .toast-message {
    color: var(--uni-toast-muted);
    font-size: 0.88rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

#toast-container .toast-message a,
#toast-container .toast-message label {
    color: var(--uni-toast-accent);
    font-weight: 700;
}

#toast-container .toast-close-button {
    align-items: center;
    background: #f4f1f7;
    border: 0;
    border-radius: 8px;
    color: #746d7b;
    display: flex;
    float: none;
    font-family: Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    height: 28px;
    justify-content: center;
    line-height: 1;
    opacity: 1;
    padding: 0 0 2px;
    position: absolute;
    right: 0.75rem;
    text-shadow: none;
    top: 0.75rem;
    width: 28px;
}

#toast-container .toast-close-button:hover,
#toast-container .toast-close-button:focus {
    background: #eae5ef;
    color: var(--uni-toast-text);
    opacity: 1;
    outline: 0;
}

#toast-container .toast-progress {
    background: var(--uni-toast-accent);
    bottom: 0;
    height: 4px;
    left: 0;
    opacity: 1;
    position: absolute;
}

.dark-mode {
    --uni-toast-bg: #28242d;
    --uni-toast-border: #403948;
    --uni-toast-text: #f5f1f7;
    --uni-toast-muted: #c5bdca;
    --uni-toast-shadow: 0 20px 48px rgba(0, 0, 0, 0.38), 0 4px 12px rgba(0, 0, 0, 0.28);
}

.dark-mode #toast-container .toast-close-button {
    background: #39333f;
    color: #cfc7d4;
}

.dark-mode #toast-container .toast-close-button:hover,
.dark-mode #toast-container .toast-close-button:focus {
    background: #484050;
    color: #ffffff;
}

@media (max-width: 575px) {
    #toast-container.toast-top-right,
    .layout-fixed #toast-container.toast-top-right {
        left: 0.75rem;
        right: 0.75rem;
        top: 4.25rem;
        width: auto;
    }

    body:not(.layout-fixed) #toast-container.toast-top-right {
        top: 0.75rem;
    }

    #toast-container > .toast {
        margin-bottom: 0.6rem;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #toast-container > .toast {
        transition: none;
    }
}
