/* Estilos do Módulo de Mandado de Prisão */
/* Versão atualizada com melhorias de design */

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.mo-container {
    max-width: 1080px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ============================================
   CARD PRINCIPAL
   ============================================ */
.mo-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.mo-card-header {
    text-align: center;
    margin-bottom: 30px;
}

/* ============================================
   ÍCONE - Usando Font Awesome fa-gavel
   ============================================ */
.mo-icon-circle {
    width: 64px;
    height: 64px;
    background: #4361ee;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
}

/* Ícone Font Awesome dentro do círculo */
.mo-icon-circle .fa-gavel,
.mo-icon-circle .fa-solid.fa-gavel {
    font-size: 24px;
    color: #fff;
}

.mo-card-header h2 {
    margin: 0 0 10px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.mo-card-header p {
    color: #666;
    margin: 0;
    font-size: 15px;
}

/* ============================================
   ÁREA DE UPLOAD
   ============================================ */
.mo-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    cursor: pointer;
}

.mo-upload-area:hover,
.mo-upload-area.mo-dragover {
    border-color: #4361ee;
    background: #f5f8ff;
}

.mo-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.mo-upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #4361ee;
}

/* Ícone Font Awesome na área de upload */
.mo-upload-icon .fa-file-pdf,
.mo-upload-icon .fa-solid.fa-file-pdf {
    font-size: 48px;
    color: #4361ee;
}

.mo-upload-area small {
    display: block;
    margin-top: 10px;
    color: #888;
    font-size: 13px;
}

.mo-upload-area.mo-success {
    border-color: #4caf50;
    background: #f1f8e9;
}

/* ============================================
   DADOS EXTRAÍDOS
   ============================================ */
.mo-extracted-data {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.mo-extracted-data h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-weight: 600;
}

.mo-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.mo-data-item label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.mo-data-item span {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* ============================================
   FORMULÁRIO
   ============================================ */
.mo-form-group {
    margin-bottom: 20px;
}

.mo-required-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.mo-required-indicator {
    color: #dc3545;
}

.mo-input,
.mo-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background-color: #fff;
}

.mo-input:focus,
.mo-select:focus {
    border-color: #4361ee;
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.mo-field-error {
    border-color: #dc3545 !important;
    background-color: #fff8f8;
}

.mo-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* ============================================
   BOTÕES - Padrão unificado
   ============================================ */
.mo-btn {
    padding: 0px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
}

/* Botão Primário (Azul) - Padrão "Cumprir Mandado" */
.mo-btn-primary {
    background: #4361ee;
    color: #fff;
    box-shadow: 0 2px 4px rgba(67, 97, 238, 0.3);
}

.mo-btn-primary:hover {
    background: #3a56d4;
    color: #fff;
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.4);
    transform: translateY(-1px);
}

.mo-btn-primary:active {
    background: #324bc2;
    transform: translateY(0);
}

/* Botão Secundário (Cinza) */
.mo-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.mo-btn-secondary:hover {
    background: #dee2e6;
    color: #333;
}

/* Botão Sucesso (Verde) */
.mo-btn-success {
    background: #28a745;
    color: #fff;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.mo-btn-success:hover {
    background: #218838;
    color: #fff;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
    transform: translateY(-1px);
}

/* Botão Link */
.mo-btn-link {
    background: none;
    color: #4361ee;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
    min-height: auto;
}

.mo-btn-link:hover {
    color: #3a56d4;
    text-decoration: underline;
}

/* Ícone dentro do botão */
.mo-btn-icon {
    margin-right: 0;
    font-size: 14px;
}

.mo-btn .fa,
.mo-btn .fas,
.mo-btn .fa-solid {
    font-size: 14px;
}

/* ============================================
   SEÇÃO DE RESULTADO
   ============================================ */
.mo-success-message {
    text-align: center;
    padding: 40px 20px;
}

.mo-success-icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
    color: #28a745;
}

.mo-success-message h3 {
    color: #4361ee;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 600;
}

.mo-success-message p {
    color: #666;
    margin-bottom: 20px;
}

/* ============================================
   ALERTAS
   ============================================ */
.mo-alert {
    padding: 15px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.mo-alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.mo-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.mo-alert-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.mo-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.mo-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #4361ee;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}

.mo-loading-text {
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
    .mo-container {
        margin: 10px;
        max-width: 100%;
    }

    .mo-card {
        padding: 20px;
    }

    .mo-form-actions {
        flex-direction: column;
    }

    .mo-btn {
        width: 100%;
    }

    .mo-data-grid {
        grid-template-columns: 1fr;
    }
}