/* Estilos específicos para el paso de Datos Familiares */

/* Permite controlar la posición vertical de los labels solo en este partial */
#partial-datos-familiares .floating-field label,
.datos-familiares-form .floating-field label {
    top: 45% !important;
}

/* Asegurar que los estados activos también respeten el estilo del partial */
#partial-datos-familiares .floating-field input:focus + label,
#partial-datos-familiares .floating-field input:not(:placeholder-shown) + label,
#partial-datos-familiares .floating-field textarea:focus + label,
#partial-datos-familiares .floating-field textarea:not(:placeholder-shown) + label,
#partial-datos-familiares .floating-field select:focus + label,
#partial-datos-familiares .floating-field select:not([value=""]) + label,
.datos-familiares-form .floating-field input:focus + label,
.datos-familiares-form .floating-field input:not(:placeholder-shown) + label,
.datos-familiares-form .floating-field textarea:focus + label,
.datos-familiares-form .floating-field textarea:not(:placeholder-shown) + label,
.datos-familiares-form .floating-field select:focus + label,
.datos-familiares-form .floating-field select:not([value=""]) + label {
    top: 0 !important;
}

/* Estilos para acordeones de familiares */
.familiar-accordion {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.familiar-accordion.active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.accordion-header {
    padding: 16px 20px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    user-select: none;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-title {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    letter-spacing: -0.01em;
}

.parentesco-display {
    color: #00abb6;
}

.nombre-display {
    color: #6c757d;
}

.accordion-icon {
    font-size: 12px;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.familiar-accordion.active .accordion-icon {
    transform: rotate(0deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.familiar-accordion.active .accordion-content {
    max-height: 5000px;
}

.familiar-form {
    padding: 24px;
}

/* Botón agregar familiar */
.add-familiar-container {
    margin-top: 32px;
    text-align: center;
}

.btn-add-familiar {
    padding: 12px 24px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
}

.btn-add-familiar:hover {
    background: #e9ecef;
    border-color: #00abb6;
    color: #00abb6;
}

.btn-add-familiar span {
    font-size: 20px;
    font-weight: 700;
    color: #00abb6;
}

/* Botón eliminar familiar */
.familiar-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.btn-remove-familiar {
    padding: 10px 20px;
    background: #dc3545;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-remove-familiar:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Switch de representante */
.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.switch-label {
    font-size: 15px;
    font-weight: 500;
    color: #212529;
    margin: 0;
    flex-shrink: 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: #00abb6;
}

.switch input:focus + .slider {
    box-shadow: 0 0 0 3px rgba(0, 171, 182, 0.2);
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

.switch input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.switch-text {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    min-width: 30px;
}

/* Reutilizar estilos de datos-estudiante */
.datos-familiares-form .form-section {
    margin-bottom: 40px;
}

.datos-familiares-form .section-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
    letter-spacing: -0.01em;
}

.datos-familiares-form .form-row {
    margin-bottom: 24px;
}

.datos-familiares-form .form-row.form-row--two-cols {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.datos-familiares-form .form-row.form-row--two-cols .form-col {
    flex: 1 1 0;
    min-width: 220px;
}

.datos-familiares-form .btn-select-map {
    margin-top: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
}

.datos-familiares-form .btn-select-map:hover {
    background: #e9ecef;
    border-color: #00abb6;
    color: #00abb6;
}
