/* =========================[ MODAL OVERLAY ]========================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* =========================[ MODAL BOX ]========================= */
.modal-box {
    background: #fff;
    border-radius: var(--radius-tiny);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

  
/* =========================[ MODAL HEADER ]========================= */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-weight: 600;
    font-size: medium;
    color: #fff;
}

/* Ícone quadrado branco */
.modal-header .modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-tiny);
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    margin-right: 10px;
}

.modal-header .modal-icon i {
    font-family: "Font Awesome 6 Free";
    font-weight: 900; /* sólido */
    font-style: normal; /* evita itálico */
    font-size: 16px;
}

/* Título */
.modal-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Botão fechar */
.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--radius-tiny);
    background: var(--color-red);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #fff;
    color: var(--color-red);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
/* =========================[ MODAL CONTENT ]========================= */
.modal-content {
    padding: 20px 24px;
    background: #fff;
    font-size: small;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 100px); 
}

.modal-box .modal-content {
overflow: visible;
max-height: none;
}

.modal-box.modal-large .modal-content {
overflow: auto;
max-height: calc(90vh - 110px);
}
  

/* =========================[ TAMANHOS ]========================= */
.modal-small { max-width: 400px; }
.modal-medium { max-width: 600px; }
.modal-large { max-width: 900px; }

/* =========================[ TIPOS DE CABEÇALHO ]========================= */
/* Success */
.modal-box.type-success .modal-header {
    background-color: var(--color-green-save);
}
.modal-box.type-success .modal-icon i { color: var(--color-green-save); }

/* Error */
.modal-box.type-error .modal-header {
    background-color: var(--color-red);
}
.modal-box.type-error .modal-icon i { color: var(--color-red); }

/* Warning */
.modal-box.type-warning .modal-header {
    background-color: #f59e0b;
}
.modal-box.type-warning .modal-icon i { color: #f59e0b; }

/* Default */
.modal-box.type-default .modal-header {
    background-color: var(--color-gray-medium); /* tom neutro */
}
.modal-box.type-default .modal-icon i { 
    color: var(--color-gray-medium); 
}

/* Info */
.modal-box.type-info .modal-header {
    background-color: var(--color-blue-primary);
}
.modal-box.type-info .modal-icon i { 
    color: var(--color-blue-primary); 
}


/* =========================[ MODAL FOOTER ]========================= */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}