/* ==========================================================================
   Estilos Base do Dialog (Compatível com qualquer área do site)
   ========================================================================== */

.dialog-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.dialog-modal-overlay > * {
    pointer-events: auto;
}

.dialog-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.dialog-modal-box {
    position: relative;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
}

/* Tamanhos de Modal Box */
.dialog-modal-box.sm { max-width: 24rem; }
.dialog-modal-box.md { max-width: 32rem; }
.dialog-modal-box.lg { max-width: 48rem; }
.dialog-modal-box.xl { max-width: 64rem; }
.dialog-modal-box.full { max-width: 95vw; max-height: 95vh; }

/* Header do Modal */
.dialog-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.dialog-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.dialog-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.dialog-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Corpo do Modal */
.dialog-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Rodapé do Modal */
.dialog-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* ==========================================================================
   Elementos Internos (Inputs e Botões Genéricos do Dialog)
   ========================================================================== */

/* Input de texto para o prompt */
.dialog-input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 1rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #1f2937;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dialog-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Botões base */
.dialog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    outline: none;
}

/* Botão Secundário (Cancelar / Fechar) */
.dialog-btn-secondary {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #374151;
}

.dialog-btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #c5c9d1;
}

/* Botão Primário (Confirmar) */
.dialog-btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.dialog-btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}
