/* Cookie consent panel - loaded on every page (built by script.js).
   Moved out of style.css so pages with their own stylesheet (car details) get it too. */

body:has(.cookie-layer.show) .ai-help-btn,body:has(.cookie-layer.show) .enq-fab,body:has(.cookie-layer.show) .ai-chat{
opacity:0;
visibility:hidden;
pointer-events:none;
}

body.cookie-locked{overflow:hidden;touch-action:none}

.cookie-layer{
position:fixed;
inset:0;
z-index:4000;
display:none;
align-items:flex-end;
justify-content:center;
padding:18px;
}

.cookie-layer.show{display:flex}

.cookie-backdrop{
position:absolute;
inset:0;
background:rgba(7,21,47,.66);
-webkit-backdrop-filter:blur(5px);
backdrop-filter:blur(5px);
}

.cookie-banner{
position:relative;
z-index:1;
width:min(560px,100%);
max-height:calc(100dvh - 36px);
overflow-y:auto;
padding:26px 26px 22px;
border:1px solid var(--line);
border-radius:var(--radius-lg);
background:#fff;
box-shadow:0 30px 90px rgba(7,21,47,.35);
animation:cookieIn .35s var(--ease);
touch-action:pan-y;
outline:none;
}

.cookie-banner::before{
content:"";
position:absolute;
top:0;
left:24px;
right:24px;
height:4px;
border-radius:0 0 4px 4px;
background:linear-gradient(90deg,var(--gold),var(--gold2));
}

@keyframes cookieIn{
from{opacity:0;transform:translateY(24px) scale(.98)}
to{opacity:1;transform:none}
}

.cookie-head{display:flex;align-items:flex-start;gap:14px}

.cookie-badge{
flex:none;
width:46px;
height:46px;
border-radius:14px;
display:flex;
align-items:center;
justify-content:center;
background:linear-gradient(155deg,rgba(242,179,0,.16),rgba(242,179,0,.06));
border:1px solid rgba(242,179,0,.3);
}

.cookie-badge i{color:var(--gold);font-size:19px}

.cookie-head-text{padding-top:2px}

.cookie-banner .cookie-head-text strong{display:block;color:var(--ink);font-size:17px;letter-spacing:-.01em}

.cookie-banner .cookie-head-text p{
margin:6px 0 0;
color:var(--muted);
font-size:12.5px;
line-height:1.65;
}

.cookie-prefs{display:grid;gap:9px;margin:18px 0}

.cookie-prefs[hidden]{display:none}

.cookie-cat{
display:flex;
align-items:center;
gap:12px;
padding:12px 14px;
border:1px solid var(--line);
border-radius:14px;
background:#f7f9fc;
cursor:pointer;
transition:border-color .18s var(--ease),background .18s var(--ease);
}

.cookie-cat:hover{border-color:rgba(242,179,0,.45)}

.cookie-cat.is-locked{background:#fff;cursor:default}

.cookie-cat.is-locked:hover{border-color:var(--line)}

.cookie-cat-icon{
flex:none;
width:34px;
height:34px;
border-radius:10px;
display:flex;
align-items:center;
justify-content:center;
background:rgba(242,179,0,.12);
color:#b8830a;
font-size:13px;
}

.cookie-cat-icon-locked{background:rgba(34,160,90,.12);color:#1b7f47}

.cookie-cat-text{flex:1;min-width:0}

.cookie-cat-text b{display:block;color:var(--ink);font-size:13.5px}

.cookie-cat-text small{display:block;margin-top:3px;color:var(--muted);font-size:11px;line-height:1.5}

.cookie-always{
flex:none;
padding:5px 10px;
border-radius:999px;
background:rgba(34,160,90,.12);
color:#1b7f47;
font-size:10px;
font-weight:800;
white-space:nowrap;
}

.cookie-switch{position:relative;flex:none;width:44px;height:26px}

.cookie-switch input{position:absolute;inset:0;z-index:2;margin:0;opacity:0;cursor:pointer}

.cookie-switch i{
position:absolute;
inset:0;
border-radius:999px;
background:#cfd6df;
transition:background .2s var(--ease);
}

.cookie-switch i:after{
content:"";
position:absolute;
top:3px;
left:3px;
width:20px;
height:20px;
border-radius:50%;
background:#fff;
box-shadow:0 2px 6px rgba(7,21,47,.25);
transition:transform .2s var(--ease);
}

.cookie-switch input:checked + i{background:var(--gold)}

.cookie-switch input:checked + i:after{transform:translateX(18px)}

.cookie-switch input:focus-visible + i{outline:2px solid var(--ink);outline-offset:2px}

.cookie-actions{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:9px;
margin-top:4px;
}

.cookie-actions button{
display:flex;
align-items:center;
justify-content:center;
gap:7px;
height:46px;
padding:0 12px;
border:1px solid var(--line);
border-radius:12px;
background:#fff;
color:var(--ink);
font-size:12px;
font-weight:800;
cursor:pointer;
transition:transform .15s var(--ease),box-shadow .15s var(--ease),background .15s var(--ease);
}

.cookie-actions button i{font-size:11px}

.cookie-actions button[hidden]{display:none}

.cookie-actions button:hover{transform:translateY(-1px)}

.cookie-actions #cookieReject{background:#fff;border-color:var(--line);color:var(--muted)}

.cookie-actions #cookieReject:hover{border-color:var(--ink);color:var(--ink)}

.cookie-actions #cookieCustomise{background:#fff;border-color:var(--line);color:var(--muted)}

.cookie-actions #cookieCustomise:hover{border-color:var(--ink);color:var(--ink)}

.cookie-actions #cookieSave{background:var(--ink);border-color:var(--ink);color:#fff}

.cookie-actions #cookieSave:hover{box-shadow:0 10px 22px rgba(7,21,47,.3)}

.cookie-actions #cookieAccept{
background:linear-gradient(135deg,var(--gold2),var(--gold));
border-color:var(--gold);
color:var(--ink);
}

.cookie-actions #cookieAccept:hover{box-shadow:0 10px 24px rgba(242,179,0,.4)}

.cookie-actions button:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

.cookie-policy{
display:inline-flex;
align-items:center;
gap:6px;
margin-top:14px;
color:var(--muted);
font-size:11px;
font-weight:600;
text-decoration:none;
}

.cookie-policy i{font-size:9px;color:var(--gold)}

.cookie-policy:hover{color:var(--ink)}

@media(min-width:768px){
.cookie-layer{align-items:center}
}

@media(max-width:600px){
.cookie-layer{padding:10px}
.cookie-banner{max-height:calc(100dvh - 20px);padding:22px 18px 18px;border-radius:20px}
.cookie-banner::before{left:18px;right:18px}
.cookie-banner .cookie-head-text p{font-size:12px}
.cookie-actions{grid-template-columns:1fr 1fr}
.cookie-actions #cookieAccept{grid-column:1 / -1;order:-1}
.cookie-actions button{height:46px;font-size:12px}
body:has(.cookie-layer.show) .enq-fab{opacity:0;visibility:hidden;pointer-events:none}
}

@media(prefers-reduced-motion:reduce){
.cookie-banner,.banking-box{animation:none}
.cookie-switch i,.cookie-switch i:after{transition:none}
.cookie-actions button{transition:none}
}
