/**
 * MateAventura - Configuración
 * Estilos para pantalla de configuración, switches, categorías
 */

.config-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

#config-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Switch toggle moderno */
.switch-label {
    display: flex;
    align-items: center;
    font-size: 1.15rem;
    margin: 15px 0;
    cursor: pointer;
    position: relative;
    padding-left: 60px;
    user-select: none;
}

.switch-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    -moz-appearance: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    pointer-events: none;
}

.switch-slider {
    position: absolute;
    left: 0;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 50px !important;
    height: 26px !important;
    background-color: #e74c3c !important;
    border-radius: 26px !important;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    transition: all 0.3s ease;
    display: block !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background-color: white;
    border-radius: 50%;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.switch-input:checked + .switch-slider {
    background-color: #27ae60 !important;
    box-shadow: 0 0 8px rgba(39, 174, 96, 0.4);
}

.switch-input:focus + .switch-slider {
    box-shadow: 0 0 1px #4caf50;
}

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

.switch-label:hover .switch-slider {
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

.switch-text {
    margin-left: 15px;
    font-weight: 500;
}

.config-label {
    margin: 10px;
    display: inline-block;
}

/* Problem Categories */
.config-section {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.config-section h4 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    color: var(--primary);
}

.config-section .hint {
    font-size: 0.9rem;
    color: #666;
    margin: 5px 0 15px 0;
}

.problem-categories {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    margin-top: 10px !important;
    min-height: 100px !important;
    padding: 10px !important;
}

.category-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef3 100%) !important;
    border: 3px solid #ddd !important;
    border-radius: 12px !important;
    padding: 15px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    min-height: 80px !important;
    margin-bottom: 10px !important;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.category-card.selected {
    border-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.category-card.difficulty-easy {
    border-left: 6px solid #4caf50;
}

.category-card.difficulty-medium {
    border-left: 6px solid #ff9800;
}

.category-card.difficulty-hard {
    border-left: 6px solid #f44336;
}

.category-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.category-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Category Switch */
.category-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
    flex-shrink: 0;
}

.category-switch-input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    -moz-appearance: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    pointer-events: none;
}

.category-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e74c3c !important;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    transition: all 0.3s ease;
    border-radius: 28px !important;
    display: block !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.category-switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category-switch-input:checked + .category-switch-slider {
    background-color: #27ae60 !important;
    box-shadow: 0 0 8px rgba(39, 174, 96, 0.4);
}

.category-switch-input:focus + .category-switch-slider {
    box-shadow: 0 0 1px #4caf50;
}

.category-switch-input:checked + .category-switch-slider:before {
    -webkit-transform: translateX(26px);
    -moz-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.category-switch-slider:hover {
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.category-checkbox {
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.category-checkbox:checked {
    background-color: #4caf50;
    border-color: #4caf50;
}

.category-checkbox:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.category-checkbox:hover {
    border-color: #4caf50;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.3);
}
