/* ==========================================================================
   1. ESTILOS BASE E INYECTADOS (HEB UI)
   ========================================================================== */
.heb-ui-box.heb-info-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 8px;
    background-color: #f0f7ff;
    border: 1px solid #bae6fd;
    color: #1e3a8a;
    font-family: inherit;
}

.heb-info-box--inline {
    margin-top: 16px;
    width: 100%;
}

.heb-info-box--banner {
    margin-top: 8px;
    margin-bottom: 28px;
    width: 100%;
}

.heb-info-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #2563eb;
    margin-top: 2px;
    flex-shrink: 0;
}

.heb-info-box-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 4px;
}

.heb-info-box-text {
    font-size: 14px;
    line-height: 1.5;
    color: #1e40af;
    margin: 0;
}

/* ==========================================================================
   2. CONTENEDOR PRINCIPAL Y LAYOUT (MÓDULOS GENERALES)
   ========================================================================== */
.heb-portal-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
}

.heb-layout-section {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    min-height: auto;
    padding: 8px;
}

.heb-layout-container {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.heb-layout-column {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 250px;
}

/* ==========================================================================
   3. BLOQUE DE AYUDA (HEADER CARD)
   ========================================================================== */
.heb-help-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    border-radius: 16px;
    background-color: #f8fbff;
    border: 1px solid #dbeafe;
}

.heb-help-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
}

.heb-help-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 32px;
    flex-shrink: 0;
}

.heb-help-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.heb-help-subtitle {
    font-size: 18px;
    color: #6b7280;
}

/* Acciones / Botones */
.heb-help-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.heb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 180px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    background-color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.heb-btn-guide {
    color: #2563eb;
    border-color: #93c5fd;
}

.heb-btn-faq {
    color: #9333ea;
    border-color: #d8b4fe;
}

/* ==========================================================================
   4. TARJETA DEL FORMULARIO / CONTENEDOR GLOBAL Y OCULTAMIENTOS NATIVOS
   ========================================================================== */
.heb-form-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* Ocultamiento de controles nativos e internos de Power Pages */
.tab-title,
#heb_fecha_compromiso,
#heb_token_envio_revision, 
label[for="heb_token_envio_revision"],
#heb_notificacion_portal,
#heb_notificacion_portal_label {
    display: none !important;
}

/* Ajustes de padding y margenes de campos nativos */
.crmEntityFormView fieldset, 
.adxform fieldset {
    margin-bottom: 1px !important;
}

.crmEntityFormView .cell, 
.adxform .cell {
    padding: 0 28px 4px !important;
}

/* Ajuste específico para la celda de Snippet de Aviso de Privacidad */
.privacy-notice-cell {
    display: table-cell !important;
    padding: 15px !important;
    height: auto !important;
}

/* Botón Guardar Progreso */
.save-progress-btn {
    margin-right: 10px;
    background-color: #2b579a !important;
    color: #ffffff !important;
    border-color: #2b579a !important;
}

/* ==========================================================================
   5. OVERLAY Y SPINNER DE PROCESAMIENTO IA
   ========================================================================== */
#heb-ia-processing-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#heb-ia-processing-spinner .fa-spinner {
    color: #2b579a;
    margin-bottom: 15px;
}

#heb-ia-processing-spinner h3 {
    color: #333333;
    font-weight: 700;
}

#heb-ia-processing-spinner p {
    color: #666666;
}

/* ==========================================================================
   6. TOOLTIPS, ASTERISCOS Y ERRORES
   ========================================================================== */
.fa-info-circle.text-primary {
    margin-left: 5px;
    cursor: pointer;
}

.asterisco-obligatorio,
.asterisco-cert,
.asterisco-cert-main,
.asterisco-frescos-fix,
.asterisco-dinamico {
    color: red;
    font-weight: bold;
}

.asterisco-obligatorio {
    margin-left: 3px;
}

/* Placeholders de los inputs */
.form-control::placeholder {
    color: #a3a3a3 !important;
    opacity: 1 !important;
}
.form-control::-webkit-input-placeholder { color: #a3a3a3 !important; }
.form-control::-moz-placeholder { color: #a3a3a3 !important; opacity: 1 !important; }
.form-control:-ms-input-placeholder { color: #a3a3a3 !important; }

/* ==========================================================================
   7. MODAL DE PREGUNTAS FRECUENTES (FAQ)
   ========================================================================== */
.heb-faq-modal {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.heb-faq-modal .modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.heb-faq-modal .modal-title {
    font-weight: 700;
    font-size: 20px;
    display: flex;
    gap: 10px;
}

.heb-faq-modal .modal-body {
    padding: 20px;
}

.heb-faq-modal .accordion-item {
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.heb-faq-modal .accordion-button {
    width: 100%;
    padding: 14px;
    font-weight: 600;
    background-color: #f8fbff;
    border: none;
    text-align: left;
}

.heb-faq-modal .accordion-body {
    padding: 14px;
    background-color: #ffffff;
}

/* ==========================================================================
   8. FIX VISUAL TIMELINE & COMPONENTES DINÁMICOS
   ========================================================================== */
#notescontrol .entity-timeline,
#notescontrol .entity-timeline .note { 
    width: 100%; 
    max-width: 100%; 
    overflow-x: hidden; 
}
#notescontrol .entity-timeline .note > .row { 
    margin-left: 0 !important; 
    margin-right: 0 !important; 
}
#notescontrol .entity-timeline .header, 
#notescontrol .entity-timeline .content { 
    box-sizing: border-box; 
}
#notescontrol .entity-timeline .header { 
    padding-left: 0 !important; 
    padding-right: 10px !important; 
}
#notescontrol .entity-timeline .emailicon, 
#notescontrol .entity-timeline .metadata { 
    padding-left: 0 !important; 
    padding-right: 0 !important; 
    width: 100% !important; 
}
#notescontrol .entity-timeline .content,
#notescontrol .entity-timeline .description { 
    max-width: 100%; 
    overflow-x: auto; 
}
#notescontrol .entity-timeline .description table { 
    max-width: 100% !important; 
}

/* ==========================================================================
   9. MENSAJES DE NOTIFICACIÓN Y ÉXITO
   ========================================================================== */
#WebFormControl_de8fcd6d47db4d03a9cb4233096ae057 { 
    width: 100%; 
}

#MessagePanel.alert-success { 
    background: transparent !important; 
    border: none !important; 
    padding: 0 !important; 
    margin: 24px auto 40px auto !important; 
    max-width: 760px; 
    box-shadow: none !important; 
}
#MessageLabel { 
    display: block; 
    width: 100%; 
}
.heb-success-card { 
    display: flex; 
    align-items: flex-start; 
    gap: 18px; 
    background: #ffffff; 
    border: 1px solid #d7ead2; 
    border-left: 6px solid #2e7d32; 
    border-radius: 10px; 
    padding: 24px 28px; 
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.08); 
    color: #263238; 
}
.heb-success-icon { 
    width: 44px; 
    height: 44px; 
    min-width: 44px; 
    border-radius: 50%; 
    background: #e8f5e9; 
    color: #2e7d32; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 20px; 
    margin-top: 2px; 
}
.heb-success-content h2 { 
    margin: 0 0 10px 0; 
    font-size: 22px; 
    font-weight: 700; 
    color: #1f2937; 
}
.heb-success-content p { 
    margin: 0 0 8px 0; 
    font-size: 15px; 
    line-height: 1.55; 
    color: #344054; 
}
.heb-success-content p:last-child { 
    margin-bottom: 0; 
}

@media (max-width: 768px) {
    #MessagePanel.alert-success { 
        margin: 16px 12px 32px 12px !important; 
    }
    .heb-success-card { 
        padding: 20px; 
        gap: 14px; 
    }
    .heb-success-content h2 { 
        font-size: 20px; 
    }
    .heb-success-content p { 
        font-size: 14px; 
    }
}

/* Leyenda descriptiva en Declaración de Transparencia */
#leyenda_transparencia.heb-transparencia-desc {
    font-size: 15px !important;
    line-height: 1.5 !important;
    color: #333333 !important;
    margin-top: 8px !important;
    margin-bottom: 18px !important;
    font-weight: 400 !important;
}

#leyenda_transparencia.heb-transparencia-desc strong {
    color: #1f2937 !important;
    font-weight: 600 !important;
}