/* Avisos (toastr) con el diseño de la tienda: tarjeta blanca, borde fino, esquinas redondeadas,
   sombra suave, icono y acento de color según el estado (verde éxito, rojo error, ámbar aviso).
   Va DESPUÉS del CSS original de toastr (que viene en min-styles.css) y solo cambia el aspecto:
   las llamadas toastr[...] y sus opciones siguen igual. Escritorio y tablet: centrado arriba, 12 px bajo la
   cabecera. Móvil: arriba, con margen lateral, sin tapar la barra inferior. Archivo nuevo. */

#toast-container {
    --toast-accent: #5f6672;
    position: fixed;
    top: calc(var(--ro-header-h, 74px) + 12px);
    right: auto;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    width: min(380px, calc(100vw - 32px));
    margin: 0;
    padding: 0;
    pointer-events: none;
}
/* Cualquier positionClass que pida una página (centro, ancho completo, abajo) se unifica */
#toast-container.toast-top-center,
#toast-container.toast-top-full-width,
#toast-container.toast-bottom-full-width,
#toast-container.toast-bottom-center,
#toast-container.toast-bottom-right,
#toast-container.toast-bottom-left,
#toast-container.toast-top-left,
#toast-container.toast-top-right {
    top: calc(var(--ro-header-h, 74px) + 12px);
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(380px, calc(100vw - 32px));
}

#toast-container > div,
#toast-container > .toast {
    position: relative;
    box-sizing: border-box;
    width: auto !important;
    margin: 0 0 10px !important;
    padding: 14px 44px 14px 52px;
    overflow: hidden;
    border: 1px solid var(--toast-line, var(--ro-line, #e9e7e5));
    border-radius: 12px;
    background: var(--toast-bg, #fff) !important;
    background-image: none !important;
    box-shadow: 0 8px 30px rgba(34, 35, 38, .12);
    color: var(--ro-ink, #222326);
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    opacity: 1;
    pointer-events: auto;
    -webkit-filter: none;
    filter: none;
}
#toast-container > div:hover {
    box-shadow: 0 10px 34px rgba(34, 35, 38, .16);
    opacity: 1;
}

/* Acento de color y icono según el estado */
#toast-container > div::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--toast-accent);
}
#toast-container > div::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 16px;
    width: 24px;
    height: 24px;
    background: var(--toast-accent);
    -webkit-mask: var(--toast-icon) center / contain no-repeat;
    mask: var(--toast-icon) center / contain no-repeat;
}
#toast-container > .toast-success {
    --toast-accent: #2e9e5b;
    --toast-bg: #eef8f1;     /* el verde del acento, muy aclarado */
    --toast-line: #c8e6d3;
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8.5 12.5 2.5 2.5 4.5-5'/%3E%3C/svg%3E");
}
#toast-container > .toast-error {
    --toast-accent: var(--ro-brand, #d9263b);
    --toast-bg: #fdf0f2;     /* el rojo del acento, muy aclarado */
    --toast-line: #f4ccd3;
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9.5 9.5 5 5M14.5 9.5l-5 5'/%3E%3C/svg%3E");
}
#toast-container > .toast-warning {
    --toast-accent: #e39b12;
    --toast-bg: #fef6e4;     /* el ámbar del acento, muy aclarado */
    --toast-line: #f4dfae;
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.2 2.7 17.5a2 2 0 0 0 1.7 3h15.2a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9.5v4M12 17h.01'/%3E%3C/svg%3E");
}
#toast-container > .toast-info {
    --toast-accent: #4a6fa5;
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E");
}

/* Texto */
#toast-container .toast-title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ro-ink, #222326);
}
#toast-container .toast-message {
    color: var(--ro-ink, #222326);
    overflow-wrap: anywhere;
}
#toast-container .toast-message a,
#toast-container .toast-message label {
    color: var(--ro-brand, #d9263b);
    font-weight: 600;
    text-decoration: underline;
}
#toast-container .toast-message a:hover {
    color: var(--ro-brand-dark, #b71c2e);
}

/* Botón de cerrar discreto */
#toast-container .toast-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    float: none;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--ro-muted, #686a70);
    font-family: inherit;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
    opacity: .75;
    cursor: pointer;
}
#toast-container .toast-close-button:hover,
#toast-container .toast-close-button:focus {
    background: rgba(34, 35, 38, .07);
    color: var(--ro-ink, #222326);
    opacity: 1;
}
#toast-container .toast-close-button:focus-visible {
    outline: 2px solid var(--ro-ink, #222326);
    outline-offset: 1px;
}

/* Avisos con botones (confirmar "Sí / No") */
#toast-container .toast-message .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 10px 8px 0 0;
    padding: 0 16px;
    border: 1px solid var(--ro-line, #d8d5d9);
    border-radius: 8px;
    background: #fff;
    color: var(--ro-ink, #222326);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    text-decoration: none;
    cursor: pointer;
}
#toast-container .toast-message .btn:hover {
    border-color: var(--ro-brand, #d9263b);
    color: var(--ro-brand, #d9263b);
}
#toast-container .toast-message .btn[class*="btnConfirma"] {
    border-color: var(--ro-brand, #d9263b);
    background: var(--ro-brand, #d9263b);
    color: #fff;
}
#toast-container .toast-message .btn[class*="btnConfirma"]:hover {
    border-color: var(--ro-brand-dark, #b71c2e);
    background: var(--ro-brand-dark, #b71c2e);
    color: #fff;
}

/* Barra de progreso de toastr (si alguna página la activa) */
#toast-container .toast-progress {
    height: 3px;
    background: var(--toast-accent);
    opacity: .5;
}

/* ---- Móvil: arriba, con margen lateral; no llega a la barra inferior ---- */
@media (max-width: 600px) {
    #toast-container,
    #toast-container.toast-top-center,
    #toast-container.toast-top-full-width,
    #toast-container.toast-bottom-full-width,
    #toast-container.toast-bottom-center,
    #toast-container.toast-bottom-right,
    #toast-container.toast-bottom-left,
    #toast-container.toast-top-left,
    #toast-container.toast-top-right {
        top: calc(var(--ro-header-h, 100px) + 8px);
        right: 12px;
        left: 12px;
        width: auto;
        max-width: 480px;
        margin: 0 auto;
        transform: none;
    }
    #toast-container > div,
    #toast-container > .toast {
        padding: 12px 40px 12px 48px;
        font-size: 14px;
    }
    #toast-container > div::before {
        top: 12px;
        left: 14px;
    }
    #toast-container .toast-close-button {
        top: 8px;
        right: 8px;
    }
}

/* Los layouts traen un `.toast { font-size: 20px !important }` antiguo: se unifica con el diseño */
#toast-container > .toast,
#toast-container > div {
    font-size: 14px !important;
}

/* ---- Escritorio y tablet grande: letra y tarjeta algo mayores (móvil se queda en 14px) ---- */
@media (min-width: 992px) {
    #toast-container,
    #toast-container.toast-top-center,
    #toast-container.toast-top-full-width,
    #toast-container.toast-bottom-full-width,
    #toast-container.toast-bottom-center,
    #toast-container.toast-bottom-right,
    #toast-container.toast-bottom-left,
    #toast-container.toast-top-left,
    #toast-container.toast-top-right {
        width: min(440px, calc(100vw - 32px));
    }
    #toast-container > .toast,
    #toast-container > div {
        padding: 16px 48px 16px 58px;
        font-size: 16px !important;
    }
    #toast-container > div::before {
        top: 16px;
        left: 18px;
    }
    #toast-container .toast-title {
        font-size: 16px;
    }
    #toast-container .toast-message .btn {
        font-size: 14px;
    }
}
