/* =========================================================
   ATELIER ERP · TOASTIFY THEME
   Compatible con Toastify JS 1.12.0 + Bootstrap 5.3
   No modifica el comportamiento visual de otras librerías.
========================================================= */

.toastify.atelier-toast {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    box-sizing: border-box;
    width: min(430px, calc(100vw - 32px));
    max-width: calc(100vw - 24px);
    min-width: 0;
    padding: 1rem 2.6rem 1rem 1rem;
    overflow-wrap: anywhere;
    white-space: normal;
    color: #fff;
    background: rgba(30, 30, 30, .98);
    border: 1px solid rgba(194, 155, 56, .25);
    border-left: 4px solid var(--regina-gold, #C29B38);
    border-radius: 14px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, .22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    font-family: 'Montserrat', sans-serif;
    font-size: .88rem;
    line-height: 1.45;
    z-index: 2000;
}

.toastify.atelier-toast .toast-close {
    position: absolute;
    top: .65rem;
    right: .65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    color: rgba(255, 255, 255, .78);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 7px;
    font-size: 1rem;
    line-height: 1;
    opacity: 1;
    transition: background .18s ease, color .18s ease;
}

.toastify.atelier-toast .toast-close:hover,
.toastify.atelier-toast .toast-close:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .17);
    outline: 2px solid rgba(194, 155, 56, .65);
    outline-offset: 2px;
}

.atelier-toast__layout {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    width: 100%;
    min-width: 0;
}

.atelier-toast__icon {
    display: inline-flex;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    margin-top: .05rem;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
}

.atelier-toast__content {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    padding-right: .1rem;
}

.atelier-toast__title {
    display: block;
    margin: 0 0 .15rem;
    color: #fff;
    font-size: .91rem;
    font-weight: 700;
    line-height: 1.35;
}

.atelier-toast__message {
    display: block;
    color: rgba(255, 255, 255, .84);
    font-size: .84rem;
    overflow-wrap: anywhere;
}

.toastify.atelier-toast--success { border-left-color: #42b979; }
.toastify.atelier-toast--success .atelier-toast__icon { background: rgba(66, 185, 121, .18); border-color: rgba(66, 185, 121, .45); }
.toastify.atelier-toast--error { border-left-color: #ef6464; }
.toastify.atelier-toast--error .atelier-toast__icon { background: rgba(239, 100, 100, .18); border-color: rgba(239, 100, 100, .45); }
.toastify.atelier-toast--warning { border-left-color: var(--regina-gold, #C29B38); }
.toastify.atelier-toast--warning .atelier-toast__icon { background: rgba(194, 155, 56, .2); border-color: rgba(194, 155, 56, .5); }
.toastify.atelier-toast--info { border-left-color: #6eb6e8; }
.toastify.atelier-toast--info .atelier-toast__icon { background: rgba(110, 182, 232, .18); border-color: rgba(110, 182, 232, .45); }

/* Mantener los mensajes por encima del sidebar y de los modales Bootstrap. */
.toastify.atelier-toast.toastify-right { right: 1rem; }
.toastify.atelier-toast.toastify-left { left: 1rem; }
.toastify.atelier-toast.toastify-top { top: 1rem; }
.toastify.atelier-toast.toastify-bottom { bottom: 1rem; }

@media (max-width: 575.98px) {
    .toastify.atelier-toast,
    .toastify.atelier-toast.toastify-right,
    .toastify.atelier-toast.toastify-left {
        right: .75rem;
        left: .75rem;
        width: auto;
        max-width: none;
        padding: .9rem 2.4rem .9rem .85rem;
    }

    .toastify.atelier-toast.toastify-top { top: .75rem; }
    .toastify.atelier-toast.toastify-bottom { bottom: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
    .toastify.atelier-toast,
    .toastify.atelier-toast * {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
