/* ==========================================================================
   Rehojo - Overrides para CookieConsent v3
   Adapta la librería al design system de Rehojo (Bootstrap 5 + tokens)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tipografía y base
   -------------------------------------------------------------------------- */
#cc-main {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --cc-font-size: 14.5px;
    --cc-bg: var(--rh-white);
    --cc-primary-color: var(--rh-gray-900);
    --cc-secondary-color: var(--rh-gray-700);

    --cc-btn-primary-bg: var(--rh-primary);
    --cc-btn-primary-color: var(--rh-white);
    --cc-btn-primary-border-color: var(--rh-primary);
    --cc-btn-primary-hover-bg: var(--rh-primary-hover);
    --cc-btn-primary-hover-color: var(--rh-white);
    --cc-btn-primary-hover-border-color: var(--rh-primary-hover);

    --cc-btn-secondary-bg: var(--rh-white);
    --cc-btn-secondary-color: var(--rh-primary);
    --cc-btn-secondary-border-color: var(--rh-primary);
    --cc-btn-secondary-hover-bg: var(--rh-gray-50);
    --cc-btn-secondary-hover-color: var(--rh-primary-hover);
    --cc-btn-secondary-hover-border-color: var(--rh-primary-hover);

    --cc-separator-border-color: var(--rh-gray-200);
    --cc-toggle-on-bg: var(--rh-primary);
    --cc-toggle-off-bg: var(--rh-gray-300);
    --cc-toggle-on-knob-bg: var(--rh-white);
    --cc-toggle-off-knob-bg: var(--rh-white);
    --cc-toggle-readonly-bg: var(--rh-gray-300);
    --cc-toggle-readonly-knob-bg: var(--rh-white);

    --cc-cookie-category-block-bg: var(--rh-gray-50);
    --cc-cookie-category-block-border: var(--rh-gray-200);

    --cc-overlay-bg: rgba(26, 18, 58, 0.55);

    --cc-link-color: var(--rh-primary);

    --cc-footer-bg: var(--rh-gray-50);
    --cc-footer-color: var(--rh-gray-500);
    --cc-footer-border-color: var(--rh-gray-200);
}

/* --------------------------------------------------------------------------
   Consent Modal (banner principal)
   -------------------------------------------------------------------------- */
#cc-main .cm {
    border-radius: var(--rh-radius-lg);
    box-shadow: var(--rh-shadow-lg);
    border: 1px solid var(--rh-gray-200);
    max-width: 680px;
}

#cc-main .cm__title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--rh-gray-900);
}

#cc-main .cm__desc {
    line-height: 1.6;
    color: var(--rh-gray-700);
}

#cc-main .cm__btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.5rem;
    transition: var(--rh-transition);
    border-width: 2px;
}

/* --------------------------------------------------------------------------
   Preferences Modal (panel de configuración)
   -------------------------------------------------------------------------- */
#cc-main .pm {
    border-radius: var(--rh-radius-lg);
    box-shadow: var(--rh-shadow-lg);
}

#cc-main .pm__title {
    font-weight: 700;
    color: var(--rh-gray-900);
}

#cc-main .pm__section-title {
    font-weight: 600;
    color: var(--rh-gray-900);
}

#cc-main .pm__section-desc {
    color: var(--rh-gray-700);
    line-height: 1.6;
}

#cc-main .pm__btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--rh-transition);
    border-width: 2px;
}

/* --------------------------------------------------------------------------
   Cookie table dentro del modal de preferencias
   -------------------------------------------------------------------------- */
#cc-main .pm__table td,
#cc-main .pm__table th {
    font-size: 0.8125rem;
    color: var(--rh-gray-700);
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
#cc-main a.cc__link,
#cc-main .cc__link {
    color: var(--rh-primary);
    font-weight: 500;
}

#cc-main a.cc__link:hover {
    color: var(--rh-primary-hover);
}

/* --------------------------------------------------------------------------
   Botón flotante "Gestionar cookies" en el footer
   -------------------------------------------------------------------------- */
.rh-cookie-settings-btn {
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: var(--rh-transition);
}

.rh-cookie-settings-btn:hover {
    color: var(--rh-white);
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    #cc-main .cm,
    #cc-main .pm {
        transition: none !important;
    }
}
