/* ==========================================================================
   Toast notifications — reusable across the whole project.
   Sticks to the top-right corner, slides in smoothly from the right,
   stays visible, then slides back out to the right.

   Include toast.css + toast.js on any page, then call:
       Toast.success('Saved successfully.');
       Toast.error('Something went wrong.');
   ========================================================================== */

.td-toast-container {
    position: fixed;
    top: 3px;
    right: 0;
    z-index: 99999;
    width: 480px;
    max-width: calc(100% - 16px);
    pointer-events: none;
}

.td-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 7px 16px;
    background: #f8f3fa;
    border-left: 4px solid var(--td-toast-accent, #ff0000);
    border-top: 1px solid #ded7df;
    border-right: 1px solid #ded7df;
    border-bottom: 1px solid #ded7df;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
    font-family: var(--td-font-family, 'Montserrat', Arial, sans-serif);
    transform: translateX(120%);
    transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}

.td-toast.is-visible {
    transform: translateX(0);
}

.td-toast.is-leaving {
    transform: translateX(120%);
    transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}

/* Used when a newer toast is replacing this one (e.g. rapid repeated
   clicks) — closes quickly instead of the normal exit timing. */
.td-toast.is-leaving-fast {
    transform: translateX(120%);
    transition: transform .16s ease-in;
}

.td-toast__icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--td-toast-accent, #ff0000);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.td-toast__message {
    flex: 1;
    min-width: 0;
    color: #4b5563;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.td-toast__close {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-left: 16px;
    padding: 0;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1f2329;
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    line-height: 20px;
    font-family: Arial, sans-serif;
}

.td-toast__close:hover {
    background: #111418;
}

.td-toast--error {
    --td-toast-accent: #ff0000;
}

.td-toast--success {
    --td-toast-accent: #23af6f;
}

@media (max-width: 520px) {
    .td-toast-container {
        top: 8px;
        right: 8px;
        width: calc(100% - 16px);
    }

    .td-toast {
        border-radius: 6px;
    }
}
