/* ============================================
   CC PREFERENCES PANEL - Club Cámara
   Conforme a GDPR y LSSI-CE
   ============================================ */

/* Panel principal */
.cc-prefs-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    animation: ccSlideUp 0.4s ease-out;
}

@keyframes ccSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Contenedor del contenido */
.cc-prefs-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Header */
.cc-prefs-header {
    margin-bottom: 16px;
}

.cc-prefs-title {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
}

/* Body */
.cc-prefs-body {
    margin-bottom: 20px;
}

.cc-prefs-body > p {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* Opciones de preferencias */
.cc-prefs-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.cc-prefs-option {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

.cc-prefs-option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 8px;
}

.cc-prefs-option-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #C2002F;
}

.cc-prefs-option-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cc-prefs-option-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.cc-prefs-option-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
    padding-left: 28px;
}

/* Footer con botones */
.cc-prefs-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.cc-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 150px;
}

.cc-btn-primary {
    background: #C2002F;
    color: white;
}

.cc-btn-primary:hover {
    background: #9a0025;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(194, 0, 47, 0.2);
}

.cc-btn-secondary {
    background: white;
    color: #C2002F;
    border: 2px solid #C2002F;
}

.cc-btn-secondary:hover {
    background: #C2002F;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(194, 0, 47, 0.2);
}

.cc-btn-tertiary {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.cc-btn-tertiary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* Enlaces de políticas */
.cc-prefs-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cc-prefs-links a {
    font-size: 14px;
    color: #6b7280;
    text-decoration: underline;
    transition: color 0.2s;
}

.cc-prefs-links a:hover {
    color: #C2002F;
}

/* Panel oculto */
.cc-prefs-panel.hidden {
    display: none;
}

/* Animación de fade out al guardar */
.cc-prefs-panel.saving {
    animation: ccFadeOut 0.8s ease-out forwards;
}

@keyframes ccFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .cc-prefs-content {
        padding: 24px 16px;
    }

    .cc-prefs-title {
        font-size: 20px;
    }

    .cc-prefs-body > p {
        font-size: 14px;
    }

    .cc-prefs-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cc-prefs-footer {
        flex-direction: column;
    }

    .cc-btn {
        width: 100%;
        min-width: auto;
    }

    .cc-prefs-links {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .cc-prefs-content {
        padding: 20px 12px;
    }

    .cc-prefs-title {
        font-size: 18px;
    }

    .cc-prefs-option {
        padding: 12px;
    }

    .cc-prefs-option-title {
        font-size: 15px;
    }

    .cc-prefs-option-desc {
        font-size: 13px;
    }
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

.cc-btn:focus {
    outline: 3px solid rgba(194, 0, 47, 0.3);
    outline-offset: 2px;
}

.cc-btn:focus:not(:focus-visible) {
    outline: none;
}

.cc-prefs-option-label input[type="checkbox"]:focus {
    outline: 2px solid #C2002F;
    outline-offset: 2px;
}

.cc-prefs-links a:focus {
    outline: 2px solid #C2002F;
    outline-offset: 2px;
    border-radius: 2px;
}
