/* Estilos para el formulario de inscripción de socios */

.wc-socios-registration-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.wc-socios-registration-container h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.wc-socios-descriptive-text {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #856404;
}

.wc-socios-descriptive-text p {
    margin: 10px 0;
}

.wc-socios-descriptive-text strong {
    color: #6c5700;
}

.wc-socios-registration-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 25px;
    border-left: 4px solid #0073aa;
}

.wc-socios-registration-info p {
    margin: 5px 0;
}

.wc-socios-form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    background: #fafafa;
}

.wc-socios-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #0073aa;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.wc-socios-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.wc-socios-form-field {
    flex: 1;
    min-width: 200px;
}

.wc-socios-form-field.full-width {
    flex: 100%;
}

.wc-socios-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.wc-socios-form-field input,
.wc-socios-form-field textarea,
.wc-socios-form-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.wc-socios-form-field input:focus,
.wc-socios-form-field textarea:focus,
.wc-socios-form-field select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0,115,170,0.3);
}

.wc-socios-form-field small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 15px;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
    flex-shrink: 0;
}

/* Estilos para los hijos */
.child-entry {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.child-entry h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #0073aa;
    font-size: 16px;
}

/* Estilos específicos para el hijo obligatorio */
.mandatory-child-entry {
    border: 2px solid #28a745;
    background: #f8fff9;
}

.mandatory-child-entry h4 {
    color: #28a745;
    font-weight: bold;
}

.mandatory-child-notice {
    background: #d4edda;
    color: #155724;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 10px;
    border: 1px solid #c3e6cb;
}

.remove-child-btn {
    margin-top: 15px;
    align-self: flex-end;
    margin-bottom: 0;
}

.wc-socios-form-field:has(.remove-child-btn) {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

/* Botones */
.wc-socios-btn-primary,
.wc-socios-btn-secondary,
.wc-socios-btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.wc-socios-btn-primary {
    background: #0073aa;
    color: white;
}

.wc-socios-btn-primary:hover {
    background: #005a87;
}

.wc-socios-btn-secondary {
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
}

.wc-socios-btn-secondary:hover {
    background: #e1e1e1;
}

.wc-socios-btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 12px;
}

.wc-socios-btn-danger:hover {
    background: #c82333;
}

.wc-socios-btn-success {
    background: #28a745;
    color: white;
}

.wc-socios-btn-success:hover {
    background: #218838;
}

.wc-socios-form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Mensajes */
.wc-socios-messages {
    margin-top: 20px;
}

.wc-socios-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.wc-socios-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wc-socios-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wc-socios-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Validación DNI */
.dni-validation-message {
    margin-top: 5px;
    font-size: 12px;
    min-height: 16px;
}

.dni-validation-message.success {
    color: #28a745;
}

.dni-validation-message.error {
    color: #dc3545;
}

.dni-validation-message.loading {
    color: #6c757d;
}

/* Loading state */
.wc-socios-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.wc-socios-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Estilos para secciones de texto multiidioma */
.wc-socios-text-section {
    margin-bottom: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.wc-socios-text-section:last-child {
    margin-bottom: 0;
}

.wc-socios-text-content {
    padding: 15px;
    background: #fff;
    color: #555;
    line-height: 1.6;
}

.wc-socios-text-content p {
    margin: 10px 0;
}

.wc-socios-text-content p:first-child {
    margin-top: 0;
}

.wc-socios-text-content p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-socios-registration-container {
        margin: 10px;
        padding: 15px;
    }
    
    .wc-socios-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .wc-socios-form-field {
        min-width: auto;
    }
    
    .checkbox-label {
        align-items: flex-start;
    }
    
    .wc-socios-text-content {
        padding: 12px;
        font-size: 13px;
    }
}

/* Estados de campos */
.wc-socios-form-field input.valid {
    border-color: #28a745;
}

.wc-socios-form-field input.invalid {
    border-color: #dc3545;
}

/* Ocultar template */
#child-template {
    display: none;
}

/* Animaciones */
.child-entry {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.child-entry.removing {
    animation: slideOut 0.3s ease-out;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}