/* ===================== Cookie Consent (PECR / UK GDPR) ===================== */

#kelvara-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--navy-900, #060d1a);
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.35);
  padding: 20px;
  font-family: var(--font, 'DM Sans', sans-serif);
  transform: translateY(110%);
  transition: transform 0.35s ease;
}
#kelvara-cookie-banner.is-visible { transform: translateY(0); }

.kcb-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.kcb-text { flex: 1 1 420px; min-width: 260px; }
.kcb-text h2 {
  font-family: var(--font-heading, inherit);
  font-size: 1.05rem;
  margin: 0 0 6px;
  color: #fff;
}
.kcb-text p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.75);
}
.kcb-text a { color: var(--teal-400, #1fd8c4); text-decoration: underline; }

.kcb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}
.kcb-btn {
  font-family: var(--font, inherit);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.kcb-btn:hover { border-color: var(--teal-400, #1fd8c4); color: var(--teal-400, #1fd8c4); }
.kcb-btn-primary {
  background: linear-gradient(120deg, var(--teal-500, #14c6b4), var(--blue-500, #2a6df5));
  border: none;
  color: #04140f;
}
.kcb-btn-primary:hover { color: #04140f; filter: brightness(1.08); }

/* ---- Preferences modal ---- */
#kelvara-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6,13,26,0.72);
  padding: 20px;
}
#kelvara-cookie-modal.is-visible { display: flex; }

.kcm-panel {
  background: #fff;
  color: var(--navy-800, #0a1424);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 14px;
  padding: 28px;
  font-family: var(--font, inherit);
}
.kcm-panel h2 {
  font-family: var(--font-heading, inherit);
  font-size: 1.3rem;
  margin: 0 0 10px;
}
.kcm-panel > p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #4a5568;
  margin: 0 0 20px;
}
.kcm-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #e7eaf0;
}
.kcm-row:first-of-type { border-top: none; }
.kcm-row-text h3 { font-size: 0.98rem; margin: 0 0 4px; }
.kcm-row-text p { font-size: 0.85rem; color: #6b7280; margin: 0; line-height: 1.5; }

.kcm-switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.kcm-switch input { opacity: 0; width: 0; height: 0; }
.kcm-switch .kcm-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #d1d5db; border-radius: 999px; transition: 0.2s;
}
.kcm-switch .kcm-slider::before {
  content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.kcm-switch input:checked + .kcm-slider { background: var(--teal-500, #14c6b4); }
.kcm-switch input:checked + .kcm-slider::before { transform: translateX(20px); }
.kcm-switch input:disabled + .kcm-slider { background: #a8e6de; cursor: not-allowed; }

.kcm-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  justify-content: flex-end;
}
.kcm-close {
  position: absolute;
  top: 18px; right: 18px;
  background: none; border: none;
  font-size: 1.3rem; line-height: 1;
  cursor: pointer; color: #6b7280;
}
.kcm-panel { position: relative; }

@media (max-width: 640px) {
  .kcb-inner { flex-direction: column; align-items: stretch; }
  .kcb-actions { justify-content: stretch; }
  .kcb-btn { flex: 1 1 auto; text-align: center; }
}

/* ---- Legal footer bar (Companies House / Privacy / Cookie settings) ---- */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.55);
}
.footer-legal a { color: rgba(255,255,255,0.7); text-decoration: underline; }
.footer-legal a:hover { color: var(--teal-400, #1fd8c4); }
[data-cookie-settings] { cursor: pointer; }
