/* Fonemcap Votación - Estilos Frontend */

:root {
    --primary-color: #1a56db;
    --primary-dark: #0d3680;
    --primary-light: #3b82f6;
    --secondary-color: #059669;
    --accent-color: #f59e0b;
    --danger-color: #dc2626;
    --success-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

.fonemcap-votacion-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
}

/* Header */
.votacion-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.votacion-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.header-content {
    position: relative;
    z-index: 1;
}

.votacion-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.votacion-header .subtitle {
    margin: 0;
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Instrucciones */
.instrucciones {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.instrucciones h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.instrucciones ol {
    margin: 0 0 20px 20px;
    padding: 0;
}

.instrucciones li {
    margin-bottom: 10px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.instrucciones .nota {
    background: #fef3c7;
    border-left: 4px solid var(--accent-color);
    padding: 15px;
    margin: 0;
    border-radius: 6px;
    font-weight: 500;
}

/* Candidatos Section */
.candidatos-section {
    margin-bottom: 40px;
}

.candidatos-section h2 {
    color: var(--text-dark);
    margin-bottom: 25px;
    font-size: 1.75rem;
}

.candidatos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.candidato-item {
    position: relative;
}

.candidato-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.candidato-label {
    display: block;
    background: white;
    border: 3px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.candidato-label:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.candidato-item input[type="radio"]:checked + .candidato-label {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.1), var(--shadow-lg);
}

.candidato-foto-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-light);
}

.candidato-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidato-foto-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.check-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 86, 219, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.candidato-item input[type="radio"]:checked + .candidato-label .check-overlay {
    opacity: 1;
}

.candidato-info-wrapper {
    padding: 20px;
}

.candidato-nombre {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.candidato-cedula {
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}

.candidato-propuesta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.candidato-propuesta p {
    margin: 0 0 10px 0;
}

/* Votante Datos Section */
.votante-datos-section {
    background: white;
    padding: 35px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.votante-datos-section h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--primary-color);
    font-size: 1.75rem;
}

.form-fields {
    display: grid;
    gap: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-field input[type="text"],
.form-field input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-field small {
    display: block;
    margin-top: 6px;
    color: var(--text-light);
    font-size: 0.875rem;
}

.checkbox-field {
    display: flex;
    align-items: flex-start;
}

.checkbox-field label {
    display: flex;
    align-items: flex-start;
    margin: 0;
    cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Form Actions */
.form-actions {
    text-align: center;
}

.btn-votar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-votar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-votar:active {
    transform: translateY(0);
}

.btn-votar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mensaje Respuesta */
.mensaje-respuesta {
    margin-top: 30px;
    padding: 20px 25px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    animation: slideDown 0.3s ease;
}

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

.mensaje-respuesta.success {
    background: #d1fae5;
    border: 2px solid var(--success-color);
    color: #065f46;
}

.mensaje-respuesta.error {
    background: #fee2e2;
    border: 2px solid var(--danger-color);
    color: #991b1b;
}

/* No Candidatos */
.no-candidatos {
    background: white;
    padding: 60px 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.no-candidatos p {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .votacion-header {
        padding: 40px 25px;
    }
    
    .votacion-header h1 {
        font-size: 2rem;
    }
    
    .votacion-header .subtitle {
        font-size: 1.1rem;
    }
    
    .candidatos-list {
        grid-template-columns: 1fr;
    }
    
    .votante-datos-section {
        padding: 25px;
    }
    
    .btn-votar {
        width: 100%;
        padding: 16px 30px;
    }
}

@media (max-width: 480px) {
    .fonemcap-votacion-container {
        padding: 15px;
    }
    
    .votacion-header h1 {
        font-size: 1.75rem;
    }
    
    .instrucciones {
        padding: 20px;
    }
}
