/* ==========================================================================
   Gestor de consentimiento de cookies propio (sustituye a Cookiebot)
   Réplica visual del diálogo de Cookiebot con colores Fundación ColaCao.
   ========================================================================== */

#cc-root, #cc-root * { box-sizing: border-box; }

.cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.cc-overlay.cc-open { display: flex; }

.cc-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 900px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    font-family: 'Gotham', Arial, sans-serif;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

/* Cabecera */
.cc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem 0.6rem;
}
.cc-header img.cc-logo { height: 42px; width: auto; }

/* Pestañas */
.cc-tabs {
    display: flex;
    gap: 1.5rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid #e6e6e6;
}
.cc-tab {
    background: none;
    border: none;
    padding: 0.7rem 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: #777;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
.cc-tab.cc-active { color: #ed3127; border-bottom-color: #ed3127; }

/* Paneles */
.cc-panel { display: none; padding: 1.3rem 1.5rem; }
.cc-panel.cc-active { display: block; }
.cc-panel h2 { font-size: 16px; font-weight: 700; margin: 0 0 0.6rem; color: #222; }
.cc-panel p { margin: 0 0 0.9rem; }
.cc-panel a { color: #ed3127; text-decoration: underline; }

/* Fila de categorías (pestaña Consentimiento) */
.cc-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0;
    border-top: 1px solid #eee;
    margin-top: 0.4rem;
    padding-top: 1rem;
}
.cc-cat {
    flex: 1 1 25%;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    border-right: 1px solid #eee;
    padding: 0 0.5rem;
}
.cc-cat:last-child { border-right: none; }
.cc-cat .cc-cat-name { font-weight: 700; font-size: 13px; color: #333; }

/* Toggle */
.cc-switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #cfcfcf; border-radius: 24px; transition: 0.2s;
}
.cc-slider::before {
    content: ""; position: absolute; height: 18px; width: 18px;
    left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s;
}
.cc-switch input:checked + .cc-slider { background: #ed3127; }
.cc-switch input:checked + .cc-slider::before { transform: translateX(22px); }
.cc-switch input:disabled + .cc-slider { background: #ed3127; opacity: 0.55; cursor: not-allowed; }

/* Botones */
.cc-actions {
    display: flex;
    gap: 0.8rem;
    padding: 0 1.5rem 1.4rem;
    flex-wrap: wrap;
}
.cc-btn {
    flex: 1 1 auto;
    min-width: 160px;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    border: 2px solid #ed3127;
    background: #fff;
    color: #ed3127;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.cc-btn:hover { background: #ed3127; color: #fff; }
.cc-btn.cc-btn-primary { background: #ed3127; color: #fff; }
.cc-btn.cc-btn-primary:hover { background: #c9271e; border-color: #c9271e; }

/* Pestaña Detalles: acordeón de categorías */
.cc-detail { border-top: 1px solid #eee; padding: 0.9rem 0; }
.cc-detail:first-child { border-top: none; }
.cc-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cc-detail-head .cc-cat-name { font-weight: 700; }
.cc-detail p { margin: 0.6rem 0 0; color: #555; }

@media (max-width: 640px) {
    .cc-cats { flex-direction: column; }
    .cc-cat { flex-basis: 100%; border-right: none; border-bottom: 1px solid #eee; padding-bottom: 0.9rem; flex-direction: row; justify-content: space-between; text-align: left; }
    .cc-cat:last-child { border-bottom: none; }
    .cc-btn { flex-basis: 100%; }
    .cc-tabs { gap: 1rem; overflow-x: auto; }
}
