/* Sweet Coco — Modern toast notifications */

:root {
    --sc-toast-bg: #fffcf7;
    --sc-toast-text: #241812;
    --sc-toast-muted: #87796a;
    --sc-toast-border: rgba(184, 146, 90, 0.22);
    --sc-toast-shadow: 0 16px 40px rgba(42, 24, 20, 0.12), 0 4px 12px rgba(42, 24, 20, 0.06);
    --sc-toast-radius: 14px;
    --sc-toast-success: #3d7a52;
    --sc-toast-success-bg: rgba(61, 122, 82, 0.12);
    --sc-toast-error: #b54a42;
    --sc-toast-error-bg: rgba(181, 74, 66, 0.12);
    --sc-toast-warning: #a97442;
    --sc-toast-warning-bg: rgba(169, 116, 66, 0.14);
    --sc-toast-info: #4a6f8a;
    --sc-toast-info-bg: rgba(74, 111, 138, 0.12);
    --sc-toast-progress: #b8925a;
}

#toast-container {
    pointer-events: none;
}

#toast-container > div {
    pointer-events: auto;
}

#toast-container > .sc-toast {
    position: relative;
    overflow: hidden;
    width: min(380px, calc(100vw - 32px));
    margin: 0 0 12px;
    padding: 16px 44px 16px 58px;
    border: 1px solid var(--sc-toast-border);
    border-radius: var(--sc-toast-radius);
    background: var(--sc-toast-bg) !important;
    background-image: none !important;
    color: var(--sc-toast-text);
    box-shadow: var(--sc-toast-shadow);
    opacity: 1;
    font-family: "Jost", "Segoe UI", sans-serif;
    backdrop-filter: blur(8px);
    animation: scToastIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

#toast-container > .sc-toast:hover {
    box-shadow: 0 20px 48px rgba(42, 24, 20, 0.16), 0 6px 16px rgba(42, 24, 20, 0.08);
    opacity: 1;
}

#toast-container > .sc-toast::before {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    line-height: 1;
}

#toast-container > .sc-toast.toast-success::before {
    content: "\f058";
    color: var(--sc-toast-success);
    background: var(--sc-toast-success-bg);
}

#toast-container > .sc-toast.toast-error::before {
    content: "\f06a";
    color: var(--sc-toast-error);
    background: var(--sc-toast-error-bg);
}

#toast-container > .sc-toast.toast-warning::before {
    content: "\f071";
    color: var(--sc-toast-warning);
    background: var(--sc-toast-warning-bg);
}

#toast-container > .sc-toast.toast-info::before {
    content: "\f05a";
    color: var(--sc-toast-info);
    background: var(--sc-toast-info-bg);
}

#toast-container > .sc-toast .toast-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--sc-toast-text);
    margin-bottom: 2px;
    line-height: 1.35;
}

#toast-container > .sc-toast .toast-message {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--sc-toast-muted);
    word-wrap: break-word;
}

#toast-container > .sc-toast:not(:has(.toast-title:not(:empty))) .toast-message {
    color: var(--sc-toast-text);
    font-weight: 500;
}

#toast-container > .sc-toast .toast-title:empty,
#toast-container > .sc-toast .toast-title:not(:empty) + .toast-message:empty {
    display: none;
}

#toast-container > .sc-toast .toast-title:not(:empty) + .toast-message {
    font-size: 13px;
}

#toast-container > .sc-toast .toast-message a,
#toast-container > .sc-toast .toast-message label {
    color: #a97442;
    font-weight: 500;
}

#toast-container > .sc-toast .toast-message a:hover {
    color: #4a2f26;
}

#toast-container > .sc-toast .toast-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    float: none;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--sc-toast-muted);
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    opacity: 0.65;
    text-shadow: none;
    transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

#toast-container > .sc-toast .toast-close-button:hover,
#toast-container > .sc-toast .toast-close-button:focus {
    opacity: 1;
    color: var(--sc-toast-text);
    background: rgba(42, 24, 20, 0.06);
}

#toast-container > .sc-toast .toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background: var(--sc-toast-progress);
    opacity: 0.75;
    border-radius: 0 2px 0 var(--sc-toast-radius);
}

#toast-container > .sc-toast.toast-success .toast-progress {
    background: var(--sc-toast-success);
}

#toast-container > .sc-toast.toast-error .toast-progress {
    background: var(--sc-toast-error);
}

#toast-container > .sc-toast.toast-warning .toast-progress {
    background: var(--sc-toast-warning);
}

#toast-container > .sc-toast.toast-info .toast-progress {
    background: var(--sc-toast-info);
}

#toast-container.sc-toast-top-right,
#toast-container.toast-top-right {
    top: 20px;
    right: 20px;
}

#toast-container.sc-toast-top-left,
#toast-container.toast-top-left {
    top: 20px;
    left: 20px;
}

#toast-container.sc-toast-bottom-right,
#toast-container.toast-bottom-right {
    bottom: 20px;
    right: 20px;
}

@keyframes scToastIn {
    from {
        opacity: 0;
        transform: translateX(18px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@media (max-width: 480px) {
    #toast-container.sc-toast-top-right,
    #toast-container.toast-top-right,
    #toast-container.sc-toast-top-left,
    #toast-container.toast-top-left {
        top: 12px;
        left: 12px;
        right: 12px;
    }

    #toast-container > .sc-toast {
        width: 100%;
        margin-bottom: 10px;
        padding: 14px 40px 14px 52px;
    }

    #toast-container > .sc-toast::before {
        left: 14px;
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
}
