/* ==========================================================================
   Cookie consent banner
   Markup: inc/cookie-banner.php   Behaviour: js/cookie-banner.js
   ========================================================================== */

.cb-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  min-height: 210px;
  font-family: system-ui, sans-serif;
}

.cb-wrap.hidden {
  transform: translateY(200%);
}

/* Backdrop shown behind the preferences drawer
   ========================================================================== */

.cb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cb-overlay.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Preferences drawer
   ========================================================================== */

.cb-drawer {
  position: absolute;
  right: 0;
  bottom: 108px;
  left: 0;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-bottom: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
}

.cb-drawer.open {
  z-index: 10000000;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cb-drawer-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 16px 20px 12px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.cb-drawer-header p {
  margin-top: 6px;
  color: #999;
  font-size: 11px;
  line-height: 1.55;
}

.cb-drawer-header .cookie-title {
  font-size: 13px;
}

.cb-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.cb-row:last-child {
  border-bottom: none;
}

.cb-row-text {
  flex: 1;
}

.cb-row-title {
  margin-bottom: 3px;
  color: #111;
  font-size: 13px;
  font-weight: 600;
}

.cb-row-desc {
  color: #888;
  font-size: 12px;
  line-height: 1.5;
}

.cb-save-row {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

/* Toggle switch
   ========================================================================== */

.cb-toggle {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  margin-top: 2px;
}

.cb-toggle input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.cb-toggle-track {
  position: absolute;
  inset: 0;
  background: #e0e0e0;
  cursor: pointer;
  transition: background 0.2s;
}

.cb-toggle input:checked + .cb-toggle-track {
  background: #111;
}

.cb-toggle input:disabled + .cb-toggle-track {
  background: #111;
  cursor: not-allowed;
  opacity: 0.55;
}

.cb-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  pointer-events: none;
  transition: left 0.2s;
}

.cb-toggle input:checked ~ .cb-toggle-thumb {
  left: 19px;
}

/* "Do not sell" status badge
   ========================================================================== */

.cb-dnss-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: #111;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.cb-dnss-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #111;
  border-radius: 50%;
}

/* Banner
   ========================================================================== */

#cookie-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border-top: 1px solid #333;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.32s ease;
}

#cookie-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.cookie-body {
  display: flex;
  flex: 1;
  min-width: 0;
}

.cookie-title {
  margin-bottom: 5px;
  color: #111;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.cookie-desc {
  max-width: 100%;
  color: #888;
  font-size: 12px;
  line-height: 1.6;
}

.cookie-desc a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-body p,
.cookie-body .cookie-desc a {
  color: #666;
  font-family: sans-serif;
  font-size: 15px;
}

.cookie-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-right: 40px;
  padding-left: 40px;
}

.cookie-btn {
  width: 146px;
  height: 40px;
  padding: 0;
  color: #19578b;
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 40px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cookie-btn-accept {
  color: #333;
  background: #fff;
  border: 1px solid #111;
}

.cookie-btn-decline {
  color: #111;
  background: #fff;
  border: 1px solid #111;
}

.cookie-btn-decline:hover {
  background: #f5f5f5;
}

.cookie-btn-customize,
.cookie-btn-customize.active {
  color: #333;
  background: transparent;
  border: 1px solid #333;
}

.cookie-btn-customize:hover {
  background: #fff;
}

.cookie-close {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: #bbb;
  font-size: 13px;
  line-height: 1;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.15s;
}

.cookie-close:hover {
  color: #fff;
}

/* Small screens
   ========================================================================== */

@media screen and (max-width: 981px) {
  .cookie-body {
    display: block;
  }

  .cb-drawer {
    max-height: 80vh;
    overflow-y: scroll;
  }

  .cookie-btn {
    width: 100%;
    max-width: 90%;
  }

  .cookie-actions {
    padding-right: 0;
    padding-left: 0;
  }
}
