/* =========================================
   Klaro custom theme – misterpato.es
   Uses !important throughout because Klaro
   injects its own <style> tag via JS at
   runtime, which always beats <link> in <head>.
   ========================================= */

/* ---- Cookie Notice (bottom bar) ---- */
.klaro .cookie-notice {
    font-family: "Inter", sans-serif !important;
    background: #fff !important;
    border-top: 1px solid #e3e9ef !important;
    box-shadow: 0 -4px 24px rgba(18, 21, 25, 0.08) !important;
    color: #576071 !important;
    border-radius: 1rem 1rem 0 0 !important;
}

.klaro .cookie-notice .cn-body {
    color: #576071 !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
}

.klaro .cookie-notice a,
.klaro .cookie-notice a:link,
.klaro .cookie-notice a:visited {
    color: #121519 !important;
    font-weight: 600 !important;
}

.klaro .cookie-notice a:hover {
    color: #fecc00 !important;
}

/* ---- Cookie Modal overlay ---- */
.klaro .cookie-modal .cm-bg {
    background: rgba(18, 21, 25, 0.5) !important;
}

/* Modal box */
.klaro .cookie-modal .cm-modal,
.klaro .cookie-modal .cm-modal.cm-klaro {
    font-family: "Inter", sans-serif !important;
    background: #fff !important;
    color: #576071 !important;
    border-radius: 1rem !important;
    box-shadow: 0 8px 40px rgba(18, 21, 25, 0.15) !important;
    border: none !important;
}

/* Modal header */
.klaro .cookie-modal .cm-header {
    background: #fff !important;
    border-bottom: 1px solid #e3e9ef !important;
    border-radius: 1rem 1rem 0 0 !important;
}

.klaro .cookie-modal .cm-header h1,
.klaro .cookie-modal .cm-header h2 {
    color: #121519 !important;
    font-weight: 700 !important;
    font-family: "Inter", sans-serif !important;
}

.klaro .cookie-modal .cm-header a.hide {
    color: #858c97 !important;
}

/* Modal body */
.klaro .cookie-modal .cm-body {
    background: #fff !important;
}

.klaro .cookie-modal .cm-body p,
.klaro .cookie-modal .cm-body span {
    color: #576071 !important;
    font-family: "Inter", sans-serif !important;
}

.klaro .cookie-modal .cm-body a,
.klaro .cookie-modal .cm-body a:link {
    color: #121519 !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
}

.klaro .cookie-modal .cm-body a:hover {
    color: #fecc00 !important;
}

.klaro .cookie-modal p,
.klaro .cookie-modal strong,
.klaro .cookie-modal h1,
.klaro .cookie-modal h2,
.klaro .cookie-modal ul,
.klaro .cookie-modal li,
.klaro .context-notice p,
.klaro .context-notice strong,
.klaro .context-notice h1,
.klaro .context-notice h2,
.klaro .context-notice ul,
.klaro .context-notice li,
.klaro .cookie-notice p,
.klaro .cookie-notice strong,
.klaro .cookie-notice h1,
.klaro .cookie-notice h2,
.klaro .cookie-notice ul,
.klaro .cookie-notice li {
    color: #576071;
}

/* Purpose & service titles */
.klaro .cookie-modal .cm-purposes .title,
.klaro .cookie-modal .cm-list-title {
    color: #121519 !important;
    font-weight: 600 !important;
    font-family: "Inter", sans-serif !important;
}

.klaro .cookie-modal .cm-list-description,
.klaro .cookie-modal p.purposes {
    color: #858c97 !important;
    font-size: 0.85rem !important;
}

/* Dividers between services */
.klaro .cookie-modal ul.cm-list li {
    border-top: 1px solid #e3e9ef !important;
}

/* Toggle switch – OFF state (grey) */
.klaro .cookie-modal .cm-list-label .slider {
    background-color: #b4bbc3 !important;
    border-radius: 50rem !important;
    transition: background-color 0.2s ease !important;
}

/* Toggle switch – ON state (yellow) */
.klaro .cookie-modal .cm-list-input:checked + .cm-list-label .slider {
    background-color: #fecc00 !important;
}

/* Toggle switch – focus ring */
.klaro .cookie-modal .cm-list-input:focus + .cm-list-label .slider {
    box-shadow: 0 0 0 3px rgba(254, 204, 0, 0.35) !important;
}

/* Toggle knob colour so it stays white on both states */
.klaro .cookie-modal .cm-list-label .slider::before {
    background-color: #fff !important;
}

/* Required / always-on service (green, non-interactive) */
.klaro .cookie-modal .cm-list-input:disabled + .cm-list-label .slider {
    background-color: #3fca90 !important;
    cursor: not-allowed !important;
}

/* Modal footer */
.klaro .cookie-modal .cm-footer {
    background: #f6f9fc !important;
    border-top: 1px solid #e3e9ef !important;
    border-radius: 0 0 1rem 1rem !important;
}

/* ---- Buttons ---- */
.klaro .cm-btn {
    font-family: "Inter", sans-serif !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

/* Accept all – yellow primary */
.klaro .cm-btn.cm-btn-success,
.klaro .cm-btn.cm-btn-accept-all {
    background-color: #fecc00 !important;
    border-color: #fecc00 !important;
    color: #121519 !important;
}

.klaro .cm-btn.cm-btn-success:hover,
.klaro .cm-btn.cm-btn-accept-all:hover {
    background-color: #e6b800 !important;
    border-color: #e6b800 !important;
    color: #121519 !important;
}

/* Save selection – outlined */
.klaro .cm-btn.cm-btn-accept {
    background-color: transparent !important;
    border-color: #d7dde2 !important;
    color: #576071 !important;
}

.klaro .cm-btn.cm-btn-accept:hover {
    background-color: #edf1f5 !important;
    border-color: #b4bbc3 !important;
    color: #121519 !important;
}

/* Decline – text-only */
.klaro .cm-btn.cm-btn-danger,
.klaro .cm-btn.cm-btn-decline {
    background: transparent !important;
    border-color: transparent !important;
    color: #858c97 !important;
    box-shadow: none !important;
}

.klaro .cm-btn.cm-btn-danger:hover,
.klaro .cm-btn.cm-btn-decline:hover {
    color: #576071 !important;
    text-decoration: underline !important;
}

/* Learn more / info link */
.klaro .cm-btn.cm-btn-info,
.klaro .cookie-notice a.cn-learn-more {
    background: transparent !important;
    border-color: transparent !important;
    color: #576071 !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    box-shadow: none !important;
}

/* ---- Cookie preferences FAB ---- */
.klaro-fab {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background-color: #121519;
    color: #fecc00;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(18, 21, 25, 0.25);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}

.klaro-fab:hover {
    background-color: #434a57;
    box-shadow: 0 6px 20px rgba(18, 21, 25, 0.35);
    transform: translateY(-2px);
}

.klaro-fab:active {
    transform: translateY(0);
}

/* ---- Responsive: slide-up sheet on mobile ---- */
@media (max-width: 576px) {
    .klaro .cookie-modal .cm-modal {
        border-radius: 1rem 1rem 0 0 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
    }
}
