/* Alertas do SGC (SweetAlert2 11): showConfirmationDialog, showToast e showInputMotivo */

.swal2-container.swal2-backdrop-show { background: rgba(13, 22, 38, .5) !important; }

/* Base para qualquer alerta, inclusive os montados direto com Swal.fire nas telas */
.swal2-popup:not(.swal2-toast) {
    border-radius: 18px;
    font-family: inherit;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

/* ---------- Alerta padrão ---------- */
.swal2-popup.sgc-alerta {
    width: 27rem;
    max-width: calc(100% - 2rem);
    padding: 1.5rem 1.5rem 1.25rem;
    text-align: left;
    color: #1d2233;
}
.swal2-popup.sgc-alerta .swal2-icon {
    width: 46px;
    height: 46px;
    margin: 0 0 .9rem;
    justify-self: start;
    border: 0 !important;
    border-radius: 13px;
}
.swal2-popup.sgc-alerta .swal2-icon .swal2-icon-content { font-size: 1.55rem; }
.swal2-popup.sgc-alerta .swal2-title {
    margin: 0 0 .3rem;
    padding: 0;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1d2233;
}
.swal2-popup.sgc-alerta .swal2-html-container {
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: .9rem;
    line-height: 1.55;
    color: #6a7187;
}
.swal2-popup.sgc-alerta .swal2-actions {
    width: 100%;
    margin: 1.35rem 0 0;
    justify-content: flex-end;
    gap: .5rem;
}
.swal2-popup.sgc-alerta .swal2-actions button { margin: 0; }

/* Ícone ao lado do texto (avisos e erros) */
.swal2-popup.sgc-alerta--lado { grid-template-columns: 46px minmax(0, 1fr); column-gap: 1rem; }
.swal2-popup.sgc-alerta--lado .swal2-icon { grid-column: 1; grid-row: 1 / span 2; margin: 0; align-self: start; }
.swal2-popup.sgc-alerta--lado .swal2-title { grid-column: 2; grid-row: 1; align-self: end; }
.swal2-popup.sgc-alerta--lado .swal2-html-container { grid-column: 2; grid-row: 2; }
.swal2-popup.sgc-alerta--lado .swal2-actions { grid-column: 1 / -1; grid-row: 3; }

/* Cores por tipo */
.swal2-popup.sgc-alerta--pergunta .swal2-icon { color: #013755 !important; background: #e7eef5; }
.swal2-popup.sgc-alerta--info .swal2-icon { color: #0a4b78 !important; background: #e6f1fb; }
.swal2-popup.sgc-alerta--aviso .swal2-icon { color: #b86f00 !important; background: #fdf1dc; }
.swal2-popup.sgc-alerta--erro .swal2-icon,
.swal2-popup.sgc-alerta--perigo .swal2-icon { color: #d23f3f !important; background: #fbe7e7; }
.swal2-popup.sgc-alerta--sucesso .swal2-icon { color: #16935f !important; background: #e3f5ec; }

/* ---------- Botões ---------- */
.sgc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: .55rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.sgc-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(10, 75, 120, .2); }
.sgc-btn--primario { color: #fff; background: #013755; }
.sgc-btn--primario:hover { background: #0a4b78; }
.sgc-btn--perigo { color: #fff; background: #d23f3f; }
.sgc-btn--perigo:hover { background: #b93434; }
.sgc-btn--perigo:focus-visible { box-shadow: 0 0 0 4px rgba(210, 63, 63, .2); }
.sgc-btn--contorno { color: #1d2233; background: #fff; border-color: #d3d8e4; }
.sgc-btn--contorno:hover { background: #f3f5f9; }

/* ---------- Campo (motivo) ---------- */
.swal2-popup.sgc-alerta .swal2-input,
.swal2-popup.sgc-alerta .swal2-textarea {
    width: 100%;
    margin: .9rem 0 0;
    padding: .6rem .8rem;
    height: auto;
    border: 1px solid #dfe3ec;
    border-radius: 10px;
    font-size: .9rem;
    color: #1d2233;
    box-shadow: none;
}
.swal2-popup.sgc-alerta .swal2-input:focus,
.swal2-popup.sgc-alerta .swal2-textarea:focus {
    border-color: #0a4b78;
    box-shadow: 0 0 0 4px rgba(10, 75, 120, .12);
}
.swal2-popup.sgc-alerta .swal2-validation-message {
    margin: .6rem 0 0;
    padding: .5rem .75rem;
    justify-content: flex-start;
    border-radius: 9px;
    font-size: .8rem;
    color: #854f0b;
    background: #fdf1dc;
}
.swal2-popup.sgc-alerta .swal2-validation-message::before { background-color: #b86f00; }

/* ---------- Aviso de sucesso no canto ---------- */
/* o tema põe o blockUI em 1091; o aviso fica acima para continuar visível enquanto a lista recarrega */
body.swal2-toast-shown .swal2-container { z-index: 1100; }

.swal2-popup.swal2-toast.sgc-toast {
    padding: .75rem .9rem;
    border-radius: 12px;
    font-family: inherit;
    box-shadow: 0 12px 32px rgba(13, 22, 38, .2);
}
.swal2-popup.swal2-toast.sgc-toast .swal2-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    margin: 0 .75rem 0 0;
    border: 0 !important;
    border-radius: 9px;
    color: #16935f !important;
    background: #e3f5ec;
}
.swal2-popup.swal2-toast.sgc-toast .swal2-icon .swal2-icon-content { font-size: 1.2rem; }
.swal2-popup.swal2-toast.sgc-toast .swal2-title { margin: 0; font-size: .9rem; font-weight: 600; color: #1d2233; }
.swal2-popup.swal2-toast.sgc-toast .swal2-close { color: #9aa1b4; }
.swal2-popup.swal2-toast.sgc-toast .swal2-timer-progress-bar { background: #16935f; }
