/* Estilos do Módulo de Alvará de Soltura */
/* Baseado no Módulo de Mandado de Prisão, com esquema de cores Verde Esmeralda */

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

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

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

/* ============================================
   ÍCONE
   ============================================ */
.mo-alvara-icon-circle {
    width: 64px;
    height: 64px;
    background: #10B981; /* Verde Esmeralda */
    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-alvara-icon-circle .fa-file-signature,
.mo-alvara-icon-circle .fa-solid.fa-file-signature {
    font-size: 24px;
    color: #fff;
}

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

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

/* ============================================
   ÁREA DE UPLOAD
   ============================================ */
.mo-alvara-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-alvara-upload-area:hover,
.mo-alvara-upload-area.mo-dragover {
    border-color: #10B981;
    background: #ecfdf5; /* Verde bem claro */
}

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

.mo-alvara-upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #10B981;
}

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

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

.mo-alvara-upload-area.mo-success {
    border-color: #10B981;
    background: #d1fae5;
}

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

.mo-alvara-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-alvara-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

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

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

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

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

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

.mo-alvara-input,
.mo-alvara-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-alvara-input:focus,
.mo-alvara-select:focus {
    border-color: #10B981;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

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

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

/* ============================================
   BOTÕES
   ============================================ */
.mo-alvara-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 (Verde) */
.mo-alvara-btn-primary {
    background: #10B981;
    color: #fff;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.mo-alvara-btn-primary:hover {
    background: #059669;
    color: #fff;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

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

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

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

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

.mo-alvara-btn-link:hover {
    color: #059669;
    text-decoration: underline;
}

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

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

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

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

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

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

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

/* ============================================
   LOADING OVERLAY
   ============================================ */
.mo-alvara-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-alvara-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #10B981;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}

.mo-alvara-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-alvara-container {
        margin: 10px;
        max-width: 100%;
    }

    .mo-alvara-card {
        padding: 20px;
    }

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

    .mo-alvara-btn {
        width: 100%;
    }

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