/* ============================================
   Cookie Consent - RGPD Compliant
   Accesible WCAG 2.1 AA
   ============================================ */

/* Overlay */
.cc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    display: none;
}
.cc-overlay.cc-visible {
    display: block;
}

/* Banner principal */
.cc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    color: #333;
    z-index: 999999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    display: none;
    max-height: 90vh;
    overflow-y: auto;
}
.cc-banner.cc-visible {
    display: block;
}
.cc-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
}
.cc-banner h2 {
    font-size: 18px;
    font-weight: 600;
    color: #123b65;
    margin: 0 0 10px 0;
}
.cc-banner p {
    margin: 0 0 15px 0;
    color: #555;
    font-size: 14px;
}
.cc-banner a {
    color: #123b65;
    text-decoration: underline;
    font-weight: 600;
}
.cc-banner a:hover,
.cc-banner a:focus {
    color: #0a2a4a;
}

/* Botones */
.cc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}
.cc-btn {
    padding: 10px 24px;
    border: 2px solid #123b65;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    min-width: 140px;
    text-align: center;
}
.cc-btn:focus-visible {
    outline: 3px solid #123b65;
    outline-offset: 3px;
}
.cc-btn-accept {
    background: #123b65;
    color: #fff;
    border-color: #123b65;
}
.cc-btn-accept:hover {
    background: #0a2a4a;
    border-color: #0a2a4a;
}
.cc-btn-reject {
    background: #fff;
    color: #123b65;
    border-color: #123b65;
}
.cc-btn-reject:hover {
    background: #f0f4f8;
}
.cc-btn-config {
    background: transparent;
    color: #123b65;
    border-color: transparent;
    text-decoration: underline;
    min-width: auto;
    padding: 10px 12px;
}
.cc-btn-config:hover {
    color: #0a2a4a;
}

/* Panel de configuracion */
.cc-config {
    display: none;
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}
.cc-config.cc-visible {
    display: block;
}
.cc-category {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.cc-category:last-child {
    border-bottom: none;
}
.cc-category-info {
    flex: 1;
    padding-right: 20px;
}
.cc-category-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #123b65;
    margin: 0 0 4px 0;
}
.cc-category-info p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* Toggle switch accesible */
.cc-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
    margin-top: 2px;
}
.cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.cc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}
.cc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
}
.cc-toggle input:checked + .cc-toggle-slider {
    background-color: #123b65;
}
.cc-toggle input:checked + .cc-toggle-slider:before {
    transform: translateX(24px);
}
.cc-toggle input:focus-visible + .cc-toggle-slider {
    outline: 3px solid #123b65;
    outline-offset: 3px;
}
.cc-toggle input:disabled + .cc-toggle-slider {
    background-color: #123b65;
    opacity: 0.7;
    cursor: not-allowed;
}
.cc-toggle-label {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    display: block;
    text-align: center;
}

/* Boton flotante para reabrir configuracion */
.cc-reopen {
    position: fixed;
    bottom: 15px;
    left: 15px;
    background: #123b65;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 20px;
    cursor: pointer;
    z-index: 999997;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background 0.2s;
}
.cc-reopen:hover {
    background: #0a2a4a;
}
.cc-reopen:focus-visible {
    outline: 3px solid #123b65;
    outline-offset: 3px;
}
.cc-reopen.cc-visible {
    display: flex;
}

/* Responsive */
@media (max-width: 575.98px) {
    .cc-banner-inner {
        padding: 15px;
    }
    .cc-buttons {
        flex-direction: column;
    }
    .cc-btn {
        width: 100%;
    }
    .cc-category {
        flex-direction: column;
    }
    .cc-toggle {
        margin-top: 8px;
    }
}
