/**
 * Estilos mejorados para la Prueba DISC
 * Enfoque: Profesional, Elegante, Ejecutivo, Usabilidad
 */

/* Variables para una paleta de colores consistente */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #1abc9c;
    --success-color: #27ae60;
    --warning-color: #e67e22;
    --danger-color: #e74c3c;
    --light-color: #f5f5f5;
    --dark-color: #2c3e50;
    --text-color: #333333;
    --text-light: #7f8c8d;
    --border-color: #dcdfe6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    /* Dimensiones DISC */
    --disc-d-color: #e74c3c;
    --disc-i-color: #f1c40f;
    --disc-s-color: #3498db;
    --disc-c-color: #27ae60;
    
    /* Fuentes */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Helvetica Neue", Helvetica, Arial, sans-serif;
    
    /* Espaciado */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* Bordes */
    --border-radius-sm: 4px;
    --border-radius-md: 6px;
    --border-radius-lg: 8px;
    
    /* Sombras */
    --shadow-sm: 0 2px 5px var(--shadow-color);
    --shadow-md: 0 4px 10px var(--shadow-color);
    --shadow-lg: 0 8px 20px var(--shadow-color);
}

/* Reseteo */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Contenedor principal */
.disc-test-container {
    max-width: 1000px;
    margin: 2.5rem auto;
    font-family: var(--font-primary);
    background-color: #fff;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-xl);
    color: var(--text-color);
    position: relative;
    border: 1px solid var(--border-color);
}

/* Encabezado */
.disc-test-header {
    margin-bottom: var(--space-xl);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-lg);
    position: relative;
}

.disc-test-header:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--accent-color);
}

.disc-test-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: var(--space-md);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.disc-test-header p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.disc-test-header p strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Información del candidato */
.disc-candidate-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    background-color: var(--light-color);
    padding: var(--space-lg);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--secondary-color);
}

.disc-candidate-info .form-group {
    flex: 1;
    min-width: 250px;
}

.disc-candidate-info label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.disc-candidate-info input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: white;
}

.disc-candidate-info input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.disc-candidate-info input:hover {
    border-color: #bbb;
}

.disc-candidate-info input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Tabla de preguntas */
.disc-questions {
    margin-bottom: var(--space-xl);
    overflow-x: auto;
    background-color: #fff;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

.disc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.disc-table th,
.disc-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.disc-table th {
    background-color: var(--primary-color);
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.disc-table tr:last-child td {
    border-bottom: none;
}

.disc-table tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* Columnas de la tabla */
.disc-table th:first-child,
.disc-table td:first-child {
    width: 50px;
    text-align: center;
    border-right: 1px solid var(--border-color);
    background-color: var(--light-color);
    font-weight: 600;
    color: var(--primary-color);
}

.disc-table th:nth-child(3),
.disc-table td:nth-child(3),
.disc-table th:nth-child(4),
.disc-table td:nth-child(4) {
    width: 15%;
    text-align: center;
}

/* Palabras DISC */
.disc-word {
    margin: 0.5rem 0;
    padding: 0.5rem;
    font-size: 1rem;
    color: var(--text-color);
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

/* Colorear las palabras según su tipo DISC */
.disc-word[data-value="D"] {
    border-left: 3px solid var(--disc-d-color);
}

.disc-word[data-value="I"] {
    border-left: 3px solid var(--disc-i-color);
}

.disc-word[data-value="S"] {
    border-left: 3px solid var(--disc-s-color);
}

.disc-word[data-value="C"] {
    border-left: 3px solid var(--disc-c-color);
}

/* Opciones de radio */
.radio-group {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    align-items: center;
}

.radio-group input[type="radio"] {
    margin: 0.8rem 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--secondary-color);
}

/* Alternando colores de fila */
.disc-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Bloques de preguntas */
.question-block td {
    vertical-align: middle;
}

/* Resaltado de selección */
.disc-word.selected-most {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    font-weight: 600;
    border-left-width: 4px;
    padding-left: calc(0.5rem - 1px);
}

.disc-word.selected-least {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    font-weight: 600;
    border-left-width: 4px;
    padding-left: calc(0.5rem - 1px);
}

/* Barra de progreso */
.form-progress {
    margin: var(--space-xl) 0;
    padding: 0 var(--space-md);
}

.progress-bar {
    height: 10px;
    background-color: var(--light-color);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: var(--space-md);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    border-radius: 5px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    font-weight: 500;
}

/* Botones y acciones */
.form-actions {
    text-align: center;
    margin: var(--space-xl) 0;
}

.submit-button {
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    box-shadow: var(--shadow-md), 0 0 15px rgba(26, 188, 156, 0.5);
    transform: translateY(-2px);
}

.submit-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.submit-button:disabled {
    background: #e0e0e0;
    cursor: not-allowed;
    box-shadow: none;
    color: #999;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.6s;
}

.submit-button:hover::before {
    left: 100%;
}

/* Mensajes */
.form-message {
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    border-radius: var(--border-radius-md);
    display: none;
    position: relative;
    padding-left: 60px;
}

.form-message::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
}

.form-message.success {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(39, 174, 96, 0.3);
    display: block;
}

.form-message.success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2327ae60' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'%3E%3C/path%3E%3Cpolyline points='22 4 12 14.01 9 11.01'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-message.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(231, 76, 60, 0.3);
    display: block;
}

.form-message.error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e74c3c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
}

.disc-test-message {
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--secondary-color);
    color: var(--text-color);
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

.disc-test-message.error {
    background-color: rgba(231, 76, 60, 0.1);
    border-left-color: var(--danger-color);
    color: var(--danger-color);
}

/* Estilos para la página de administración */
.disc-results-admin h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: var(--space-lg);
}

.disc-admin-tools {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.disc-generate-link {
    background-color: #fff;
    padding: var(--space-lg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    flex: 1;
    min-width: 300px;
    border: 1px solid var(--border-color);
}

.disc-generate-link h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
}

.disc-generate-link .form-group {
    margin-bottom: var(--space-md);
}

.disc-generate-link label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--primary-color);
}

.disc-generate-link input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
}

.disc-generate-link input[type="email"]:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.disc-generate-link .button-primary {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.disc-generate-link .button-primary:hover {
    background-color: #2980b9;
}

.disc-results-list {
    background-color: #fff;
    padding: var(--space-lg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.disc-results-list h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
}

.disc-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

/* Estilos para la página de resultados detallados */
.disc-result-details {
    background-color: #fff;
    padding: var(--space-lg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.disc-result-details .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: var(--light-color);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.disc-result-details .button:hover {
    background-color: #e9ecef;
}

.disc-result-details .button .dashicons {
    font-size: 1rem;
}

.disc-result-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.disc-result-header h2 {
    margin-top: var(--space-lg);
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.disc-result-header p {
    margin: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.disc-result-header p strong {
    color: var(--text-color);
    font-weight: 600;
}

.disc-result-chart {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background-color: var(--light-color);
    border-radius: var(--border-radius-md);
}

.disc-result-chart h3 {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: var(--space-md);
}

.disc-bar-chart {
    margin-top: var(--space-lg);
}

.disc-bar {
    margin-bottom: var(--space-md);
}

.disc-bar-label {
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
}

.disc-bar-outer {
    height: 25px;
    background-color: #e9ecef;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.disc-bar-inner {
    height: 100%;
    color: white;
    text-align: right;
    padding-right: 10px;
    line-height: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: width 1s ease-out;
}

/* Colores de las barras según el tipo DISC */
.disc-bar:nth-child(1) .disc-bar-inner {
    background: linear-gradient(to right, #e74c3c, #c0392b);
}

.disc-bar:nth-child(2) .disc-bar-inner {
    background: linear-gradient(to right, #f1c40f, #f39c12);
}

.disc-bar:nth-child(3) .disc-bar-inner {
    background: linear-gradient(to right, #3498db, #2980b9);
}

.disc-bar:nth-child(4) .disc-bar-inner {
    background: linear-gradient(to right, #27ae60, #16a085);
}

.disc-result-answers {
    margin: var(--space-xl) 0;
}

.disc-result-interpretation,
.disc-result-profile {
    margin: var(--space-xl) 0;
    background-color: rgba(52, 152, 219, 0.05);
    padding: var(--space-lg);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--secondary-color);
}

.disc-result-interpretation h3,
.disc-result-profile h3 {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: var(--space-md);
}

.disc-result-interpretation h4 {
    margin-top: var(--space-lg);
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.disc-result-interpretation ul {
    padding-left: 1.5rem;
}

.disc-result-interpretation ul li {
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

.disc-result-actions {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.disc-result-actions .button-primary {
    background-color: var(--secondary-color);
    color: white;
}

.disc-result-actions .button-secondary {
    background-color: #f5f5f5;
    color: #e74c3c;
    border: 1px solid #e7e7e7;
}

.disc-result-actions .button-primary:hover {
    background-color: #2980b9;
}

.disc-result-actions .button-secondary:hover {
    background-color: #f8d7da;
    color: #c0392b;
}

/* Mejoras adicionales */
.copy-link {
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.copy-link:hover {
    background-color: #e9ecef;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .disc-test-container {
        padding: var(--space-md);
        margin: var(--space-md) 0;
        border-radius: var(--border-radius-sm);
    }
    
    .disc-test-header h2 {
        font-size: 1.5rem;
    }
    
    .disc-candidate-info {
        flex-direction: column;
    }
    
    .disc-table th,
    .disc-table td {
        padding: 0.75rem;
    }
    
    .disc-word {
        font-size: 0.9rem;
    }
    
    .submit-button {
        width: 100%;
        padding: 0.75rem;
    }
    
    .disc-result-header h2 {
        font-size: 1.3rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.disc-test-container {
    animation: fadeIn 0.5s ease;
}

.question-block {
    animation: fadeIn 0.3s ease;
}

.question-block:nth-child(2n) {
    animation-delay: 0.1s;
}

.question-block:nth-child(3n) {
    animation-delay: 0.2s;
}