/* CoreLedger Cookie Consent — hidden by default, .cl-show reveals */
#cl-cc-wrap,#cl-cc-wrap *{box-sizing:border-box}
#cl-cc-wrap{font-family:Inter,sans-serif;font-size:15px;color:#111827}
#cl-cc-wrap button{cursor:pointer;font-family:inherit}
#cl-cc-wrap *:focus{outline:none}

/* ---- BANNER ---- */
#cl-cc-banner{
    position:fixed;bottom:0;left:0;right:0;z-index:99998;
    background:#fff;
    border-top:3px solid #e5e7eb;
    box-shadow:0 -6px 32px rgba(0,0,0,0.14);
    padding:28px 48px;
    display:flex;align-items:center;gap:28px;
    transform:translateY(110%);
    opacity:0;
    pointer-events:none;
    transition:transform .4s ease,opacity .4s ease;
}
#cl-cc-banner.cl-show{
    transform:translateY(0);
    opacity:1;
    pointer-events:auto;
}
.cl-banner-text{flex:1;min-width:200px}
.cl-banner-text h3{font-size:18px;font-weight:700;color:#111827;margin:0 0 6px 0}
.cl-banner-text p{font-size:15px;color:#6b7280;line-height:1.6;margin:0}
.cl-banner-btns{display:flex;gap:12px;align-items:center;flex-shrink:0}

/* ---- BUTTONS ---- */
.cl-btn{
    display:inline-flex;align-items:center;justify-content:center;
    border-radius:10px;
    padding:14px 32px;
    font-size:15px;font-weight:600;
    line-height:1;white-space:nowrap;
    cursor:pointer;
    outline:none!important;
    box-shadow:none!important;
    text-decoration:none;
    transition:background-color .2s,opacity .2s,transform .15s;
}
.cl-btn-primary{
    background:#1e293b;
    color:#fff;
    border:1.5px solid transparent;
    padding:16px 40px;
    font-size:16px;
}
.cl-btn-primary:hover{background:#2d3f55;color:#fff;outline:none!important;box-shadow:none!important;transform:translateY(-1px)}
.cl-btn-secondary{
    background:#f3f4f6;
    color:#374151;
    border:1.5px solid #d1d5db;
}
.cl-btn-secondary:hover{background:#e5e7eb;color:#374151;border-color:#d1d5db;outline:none!important;box-shadow:none!important}
.cl-btn-ghost{
    background:#f3f4f6;
    color:#374151;
    border:1.5px solid #d1d5db;
}
.cl-btn-ghost:hover{background:#e5e7eb;color:#374151;border-color:#d1d5db;outline:none!important;box-shadow:none!important}
#cl-cc-wrap .cl-btn:focus,
#cl-cc-wrap .cl-btn:focus-visible,
#cl-cc-wrap .cl-btn:active{outline:none!important;box-shadow:none!important;-webkit-tap-highlight-color:transparent;border-color:transparent!important}
.cl-btn-primary:focus,.cl-btn-primary:focus-visible,.cl-btn-primary:active{background:#1e293b;color:#fff!important;outline:none!important;box-shadow:none!important;border-color:transparent!important}
.cl-btn-secondary:focus,.cl-btn-secondary:focus-visible,.cl-btn-secondary:active{background:#f3f4f6;color:#374151!important;outline:none!important;box-shadow:none!important}
.cl-btn-ghost:focus,.cl-btn-ghost:focus-visible,.cl-btn-ghost:active{background:#f3f4f6;color:#374151!important;outline:none!important;box-shadow:none!important}

/* ---- MOBILE ---- */
@media(max-width:600px){
    #cl-cc-banner{padding:16px 16px 20px;flex-wrap:wrap;gap:12px}
    .cl-banner-text{width:100%}
    .cl-banner-btns{width:100%;flex-wrap:wrap;gap:8px}
    #cl-cc-accept{order:-1;width:100%;flex:none}
    #cl-cc-reject{flex:1;min-width:0}
    #cl-cc-open-pref{flex:1;min-width:0}
}

/* ---- OVERLAY ---- */
#cl-cc-overlay{
    position:fixed;top:0;left:0;right:0;bottom:0;
    z-index:99999;
    background:rgba(0,0,0,0.50);
    display:none;
}
#cl-cc-overlay.cl-show{display:block}

/* ---- MODAL ---- */
#cl-cc-modal{
    position:fixed;top:50%;left:50%;
    transform:translate(-50%,-50%) scale(0.96);
    z-index:100000;
    background:#fff;
    border-radius:14px;
    width:min(640px,96vw);
    max-height:85vh;
    overflow-y:auto;
    box-shadow:0 24px 60px rgba(0,0,0,0.25);
    opacity:0;pointer-events:none;
    transition:transform .25s ease,opacity .25s ease;
}
#cl-cc-modal.cl-show{
    transform:translate(-50%,-50%) scale(1);
    opacity:1;pointer-events:all;
}
.cl-modal-header{
    position:sticky;top:0;background:#fff;z-index:2;
    padding:22px 28px 16px;
    border-bottom:1px solid #f3f4f6;
    display:flex;align-items:center;justify-content:space-between;
}
.cl-modal-header h2{font-size:17px;font-weight:700;color:#111827;margin:0}
.cl-modal-close{
    background:none;border:none;
    font-size:22px;color:#9ca3af;
    padding:2px 6px;border-radius:6px;
    line-height:1;
    outline:none!important;
    box-shadow:none!important;
}
.cl-modal-close:hover{background:#f3f4f6;color:#374151;outline:none!important;box-shadow:none!important}
.cl-modal-body{padding:20px 28px}
.cl-modal-footer{
    position:sticky;bottom:0;background:#fff;
    border-top:1px solid #f3f4f6;
    padding:16px 28px;
    display:flex;flex-direction:row;gap:10px;
}
.cl-modal-footer .cl-btn{flex:1;text-align:center;justify-content:center;padding:12px 20px!important;font-size:15px!important;box-sizing:border-box}
@media(max-width:600px){
    .cl-modal-footer{flex-direction:column}
    .cl-modal-footer .cl-btn{width:100%}
    #cl-cc-reject-modal{order:1}
    #cl-cc-save-pref{order:2}
    #cl-cc-accept-modal{order:3}
}

/* ---- ACCORDION ---- */
.cl-accordion{border:1.5px solid #e5e7eb;border-radius:10px;margin-bottom:12px;overflow:hidden}
.cl-accordion-head{
    display:flex;align-items:center;justify-content:space-between;
    padding:14px 18px;cursor:pointer;background:#f9fafb;
    gap:12px;user-select:none;
}
.cl-accordion-head:hover{background:#f3f4f6}
.cl-acc-info{flex:1;min-width:0}
.cl-acc-title{font-weight:700;font-size:14px;color:#111827}
.cl-acc-desc{font-size:12px;color:#6b7280;margin-top:3px;line-height:1.4}
.cl-acc-right{display:flex;align-items:center;gap:10px;flex-shrink:0}
.cl-always-active{font-size:12px;font-weight:700;color:#16a34a}
.cl-acc-arrow{font-size:10px;color:#9ca3af;transition:transform .2s;display:inline-block}
.cl-accordion.cl-open .cl-acc-arrow{transform:rotate(180deg)}
.cl-accordion-body{display:none;padding:16px 18px;border-top:1px solid #f3f4f6;background:#fff}
.cl-accordion.cl-open .cl-accordion-body{display:block}

/* ---- TOGGLE ---- */
.cl-toggle{position:relative;width:44px;height:24px;flex-shrink:0;display:inline-block}
.cl-toggle input{opacity:0;width:0;height:0;position:absolute}
.cl-toggle-slider{
    position:absolute;top:0;left:0;right:0;bottom:0;
    background:#d1d5db;border-radius:24px;
    cursor:pointer;transition:.3s;
}
.cl-toggle-slider:before{
    content:"";position:absolute;
    width:18px;height:18px;left:3px;top:3px;
    background:#fff;border-radius:50%;
    box-shadow:0 1px 3px rgba(0,0,0,0.2);
    transition:.3s;
}
.cl-toggle input:checked + .cl-toggle-slider{background:#1e293b}
.cl-toggle input:checked + .cl-toggle-slider:before{transform:translateX(20px)}

/* ---- COOKIE TABLE ---- */
.cl-cookie-table{width:100%;border-collapse:collapse;font-size:12px;margin-top:12px}
.cl-cookie-table th{background:#f9fafb;text-align:left;padding:7px 10px;color:#6b7280;font-weight:600;border-bottom:1.5px solid #e5e7eb;font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.cl-cookie-table td{padding:8px 10px;border-bottom:1px solid #f3f4f6;vertical-align:top;color:#374151;line-height:1.4}
.cl-cookie-table tr:last-child td{border-bottom:none}
.cl-cookie-table code{background:#f3f4f6;color:#1e293b;padding:2px 6px;border-radius:4px;font-size:11px;font-family:ui-monospace,monospace}

/* ---- REVISIT BUTTON ---- */
#cl-cc-revisit{
    position:fixed;bottom:22px;left:22px;z-index:99997;
    width:48px;height:48px;
    border-radius:50%;
    background:#1e293b;
    border:none;cursor:pointer;
    box-shadow:0 0 0 2px #EEF2F7;
    display:none;align-items:center;justify-content:center;
    padding:0;
    transition:transform .2s,box-shadow .2s;
}
#cl-cc-revisit:hover{transform:scale(1.10);box-shadow:0 0 0 2px #EEF2F7}
#cl-cc-revisit:active{transform:scale(0.95)}
#cl-cc-revisit svg{width:26px;height:26px;display:block}

/* Mobile: don't compete with the sticky CTA — settings live in the footer link. */
@media (max-width:600px){
    #cl-cc-revisit{display:none !important;}
}

/* ---- NOTICE STRIP (non-EEA visitors) ----
 * Brand-aligned per CLAUDE.md tokens:
 *   - cool light bg #EEF2F7 (matches body), navy text #1E293B
 *   - Roboto 15px / line-height 1.55 (matches paragraph rhythm)
 *   - muted secondary text #67768E for the close icon
 *   - 1px hairline border-top + barely-there shadow → reads as a continuation
 *     of the page surface, not as a popup
 *   - Bar full-width, but content capped to the site's 1200px grid via
 *     .cl-notice-inner — keeps text centred and readable on wide screens.
 */
#cl-cc-notice{
    position:fixed;bottom:0;left:0;right:0;z-index:99998;
    background:#EEF2F7;
    color:#1E293B;
    border-top:1px solid rgba(30,41,59,0.08);
    box-shadow:0 -2px 14px rgba(15,20,32,0.04);
    transform:translateY(100%);
    opacity:0;
    pointer-events:none;
    transition:transform .35s ease,opacity .35s ease;
}
#cl-cc-notice.cl-show{
    transform:translateY(0);
    opacity:1;
    pointer-events:auto;
}
.cl-notice-inner{
    max-width:1200px;
    margin:0 auto;
    padding:18px 24px;
    display:flex;align-items:center;gap:20px;
    font:400 15px/1.55 'Roboto',Inter,sans-serif;
}
.cl-notice-text{
    flex:1;color:#1E293B;
}
.cl-notice-link{
    color:#1E293B;
    font-weight:500;
    text-decoration:underline;
    text-decoration-thickness:1px;
    text-underline-offset:3px;
    flex-shrink:0;
    transition:opacity .2s ease;
}
.cl-notice-link:hover{opacity:.7;color:#1E293B}
.cl-notice-close{
    background:transparent;border:1px solid transparent;
    color:#67768E;
    font-size:24px;line-height:1;
    /* 44×44 minimum touch target per accessibility guidance */
    width:44px;height:44px;
    display:inline-flex;align-items:center;justify-content:center;
    border-radius:8px;
    margin:-4px -8px -4px 0;   /* visually compact without shrinking hit area */
    cursor:pointer;
    flex-shrink:0;
    transition:color .2s ease,background-color .2s ease;
}
.cl-notice-close:hover{color:#1E293B;background:rgba(30,41,59,0.06)}
.cl-notice-close:focus,.cl-notice-close:focus-visible{outline:none}

/* Mobile (≤600 px): float as a contained pill so the strip doesn't dominate
 * the small viewport. Centred horizontally with small side margins, lifted
 * off the bottom edge, rounded corners. Tablet + desktop keep the default
 * full-width edge-to-edge bar. */
@media(max-width:600px){
    #cl-cc-notice{
        left:50%;right:auto;
        bottom:14px;
        width:calc(100% - 24px);
        border:1px solid rgba(30,41,59,0.10);
        border-radius:12px;
        box-shadow:0 6px 22px rgba(15,20,32,0.10);
        /* default hidden: shift down + horizontal centre */
        transform:translate(-50%, calc(100% + 14px));
    }
    #cl-cc-notice.cl-show{
        transform:translate(-50%, 0);
    }
    .cl-notice-inner{padding:14px 18px;font-size:14px;gap:14px;line-height:1.5}
    .cl-notice-text{font-size:14px}
}
