/* ═══════════════════════════════════════════════════════════════
   Toasts (x-toastr, toastr.js): flat and square like the buttons of the brand home pages, in fixed colours
   that stand out on every brand: red error, orange warning, green success, blue info.
   They sit below the header of the page: x-toastr measures it and sets --toast-top.
   Replaces toastr.min.css; the selectors start at #toast-container so that Bootstrap's own .toast
   (vendor and customer area) does not interfere.
   ═══════════════════════════════════════════════════════════════ */

#toast-container {
    --toast-success: #15803d;
    --toast-error: #dc2626;
    --toast-warning: #ea580c;
    --toast-info: #2563eb;

    position: fixed;
    z-index: 100000;
    top: var(--toast-top, 16px);
    right: max(16px, env(safe-area-inset-right, 0px));
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(400px, calc(100vw - 24px));
    pointer-events: none;
}

#toast-container > .toast {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 44px 12px 14px;
    overflow: hidden;
    border: 0;
    border-radius: 0.25rem;
    background-image: none;
    color: #fff;
    font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 12px 30px -10px rgb(0 0 0 / 0.4);
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
    animation: toastIn 0.28s ease-out both;
}

#toast-container > .toast-success { background-color: var(--toast-success); }
#toast-container > .toast-error   { background-color: var(--toast-error); }
#toast-container > .toast-warning { background-color: var(--toast-warning); }
#toast-container > .toast-info    { background-color: var(--toast-info); }

/* the symbol in a lighter square: check, exclamation mark, triangle, "i" */
#toast-container > .toast::before {
    content: '';
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 0.25rem;
    background: rgb(255 255 255 / 0.2) center / 16px 16px no-repeat;
}

#toast-container > .toast-success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

#toast-container > .toast-error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6.5v7M12 17.5h.01'/%3E%3C/svg%3E");
}

#toast-container > .toast-warning::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l9.5 16.5h-19z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E");
}

#toast-container > .toast-info::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 10.5v7M12 6.5h.01'/%3E%3C/svg%3E");
}

#toast-container .toast-title {
    font-weight: 700;
}

#toast-container .toast-message {
    min-width: 0;
    overflow-wrap: anywhere;
}

#toast-container .toast-message a,
#toast-container .toast-message a:hover {
    color: #fff;
    text-decoration: underline;
}

#toast-container .toast-close-button {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
    opacity: 0.75;
    cursor: pointer;
    -webkit-appearance: none;
}

#toast-container .toast-close-button:hover,
#toast-container .toast-close-button:focus-visible {
    opacity: 1;
    background: rgb(255 255 255 / 0.15);
    outline: none;
}

#toast-container .toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background: rgb(255 255 255 / 0.45);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* phones: across the width with a small margin */
@media (max-width: 575.98px) {
    #toast-container {
        left: 12px;
        right: 12px;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    #toast-container > .toast {
        animation: none;
    }
}
