/* =====================================================================
   TEMA DAS MENSAGENS DE RETORNO (toastr) - padrao Reside
   - carregar DEPOIS do toastr.min.css
   - nao muda nenhum comportamento: so o visual (toastr.success / error / warning / info)
   ===================================================================== */

#toast-container.toast-top-center {
    top: 18px;
}

#toast-container > div {
    --toast-cor: #3b82f6;
    position: relative;
    width: 380px;
    max-width: calc(100vw - 24px);
    margin: 0 auto 10px;
    padding: 16px 20px 18px 62px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: #f5f5f5;
    background-color: #1c1c1c;
    background-image: none !important;
    border: 1px solid rgba(255, 255, 255, .08);
    border-left: 4px solid var(--toast-cor);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
    opacity: 1;
    animation: toastEntrada .35s cubic-bezier(.2, .9, .3, 1.2);
}

    #toast-container > div:hover {
        opacity: 1;
        box-shadow: 0 22px 48px rgba(0, 0, 0, .45);
    }

    /* icone em circulo com a cor do tipo */
    #toast-container > div::before {
        content: "";
        position: absolute;
        left: 16px;
        top: 50%;
        width: 30px;
        height: 30px;
        margin-top: -15px;
        border-radius: 50%;
        background-color: var(--toast-cor);
        background-repeat: no-repeat;
        background-position: center;
        background-size: 18px;
        box-shadow: 0 0 0 5px color-mix(in srgb, var(--toast-cor) 18%, transparent);
    }

/* cores e icones por tipo */
#toast-container > .toast-success {
    --toast-cor: #22c55e;
    background-color: #1c1c1c;
    background-image: none !important; /* remove o icone original do toastr */
}

    #toast-container > .toast-success::before {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3e%3cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3e%3c/svg%3e");
    }

#toast-container > .toast-error {
    --toast-cor: #ef4444;
    background-color: #1c1c1c;
    background-image: none !important; /* remove o icone original do toastr */
}

    #toast-container > .toast-error::before {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3e%3cpath d='M18.3 5.7 12 12l6.3 6.3-1.4 1.4L10.6 13.4 4.3 19.7l-1.4-1.4L9.2 12 2.9 5.7l1.4-1.4 6.3 6.3 6.3-6.3z' transform='translate(1.6 0)'/%3e%3c/svg%3e");
    }

#toast-container > .toast-warning {
    --toast-cor: #f59e0b;
    background-color: #1c1c1c;
    background-image: none !important; /* remove o icone original do toastr */
}

    #toast-container > .toast-warning::before {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3e%3cpath d='M11 4h2v10h-2zm0 13h2v3h-2z'/%3e%3c/svg%3e");
    }

#toast-container > .toast-info {
    --toast-cor: #3b82f6;
    background-color: #1c1c1c;
    background-image: none !important; /* remove o icone original do toastr */
}

    #toast-container > .toast-info::before {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3e%3cpath d='M11 10h2v10h-2zm0-6h2v3h-2z'/%3e%3c/svg%3e");
    }

/* titulo (quando usado) e mensagem */
#toast-container .toast-title {
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

#toast-container .toast-message {
    color: rgba(255, 255, 255, .9);
}

/* barra de progresso na cor do tipo */
#toast-container .toast-progress {
    height: 3px;
    background-color: var(--toast-cor);
    opacity: .85;
}

/* botao fechar (quando habilitado) */
#toast-container .toast-close-button {
    color: rgba(255, 255, 255, .7);
    text-shadow: none;
    opacity: 1;
}

    #toast-container .toast-close-button:hover {
        color: #fff;
        opacity: 1;
    }

@keyframes toastEntrada {
    from { opacity: 0; transform: translateY(-12px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

/* celular: o toastr reduz a largura e o padding; mantem o visual do tema */
@media (max-width: 480px) {
    #toast-container > div {
        width: calc(100vw - 24px);
        padding: 14px 16px 16px 58px;
        font-size: 13px;
    }
}
