/* 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. */
.cookie-banner{
position:fixed;
left:18px;
bottom:18px;
z-index:1000;
width:min(420px,calc(100% - 36px));
padding:19px;
display:none;
border:1px solid var(--line);
border-radius:20px;
background:#fff;
box-shadow:var(--shadow-lg);
}

.cookie-banner.show{
display:block;
animation:cookieIn .35s var(--ease);
}

@keyframes cookieIn{
from{opacity:0;transform:translateY(20px)}
to{opacity:1;transform:none}
}

.cookie-banner strong{font-size:14px}

.cookie-banner p{
margin:7px 0 13px;
color:var(--muted);
font-size:10px;
line-height:1.6;
}

.cookie-actions{
display:flex;
gap:8px;
}

.cookie-actions button{
height:40px;
padding:0 15px;
border:1px solid var(--line);
border-radius:12px;
background:#fff;
font-size:10px;
font-weight:800;
}

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

@media (max-width: 600px){
.cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    padding: 16px;
    border-radius: 18px;
  }
.cookie-banner strong { font-size: 13px; }
.cookie-banner p { font-size: 10px; }
.cookie-actions button { height: 40px; font-size: 10px; }
}

@media(max-width:600px){
body:has(.cookie-banner.show) .enq-fab{opacity:0;visibility:hidden;pointer-events:none}
}

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,.62);
-webkit-backdrop-filter:blur(4px);
backdrop-filter:blur(4px);
}

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

.cookie-head{display:flex;align-items:center;gap:10px}

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

.cookie-layer .cookie-banner .cookie-head strong{color:var(--ink);font-size:16px}

.cookie-layer .cookie-banner > p{
margin:10px 0 16px;
color:var(--muted);
font-size:12.5px;
line-height:1.6;
}

.cookie-prefs{display:grid;gap:8px;margin:0 0 16px}

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

.cookie-cat{
display:flex;
align-items:center;
justify-content:space-between;
gap:14px;
padding:12px 14px;
border:1px solid var(--line);
border-radius:14px;
background:#f7f9fb;
cursor:pointer;
}

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

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

.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 9px;
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-layer .cookie-actions{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:8px;
}

.cookie-layer .cookie-actions button{
height:44px;
padding:0 12px;
border:1px solid var(--line);
border-radius:12px;
background:#fff;
color:var(--ink);
font-size:12px;
font-weight:800;
cursor:pointer;
}

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

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

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

.cookie-layer .cookie-actions #cookieAccept{background:var(--gold);border-color:var(--gold);color:var(--ink)}

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

.cookie-policy{
display:inline-block;
margin-top:12px;
color:var(--muted);
font-size:11px;
text-decoration:underline;
}

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

@media(max-width:600px){
.cookie-layer{padding:10px}
.cookie-layer .cookie-banner{max-height:calc(100dvh - 20px);padding:18px 16px;border-radius:20px}
.cookie-layer .cookie-banner > p{font-size:12px}
.cookie-layer .cookie-actions{grid-template-columns:1fr 1fr}
.cookie-layer .cookie-actions #cookieAccept{grid-column:1 / -1;order:-1}
.cookie-layer .cookie-actions button{height:46px;font-size:12px}
}

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