/* PDPA cookie consent */
.cookie-consent__bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 65;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
}

@media (max-width: 1023px) {
  body.has-mobile-tab-bar .cookie-consent__bar {
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }
}

.cookie-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  transition: opacity 0.15s, background 0.15s;
  white-space: nowrap;
}

.cookie-consent__btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
}

.cookie-consent__btn--primary:hover {
  opacity: 0.95;
}

.cookie-consent__btn--outline {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.cookie-consent__btn--outline:hover {
  background: #f8fafc;
}

.cookie-consent__btn--ghost {
  background: transparent;
  color: #64748b;
  border: none;
}

.cookie-consent__btn--ghost:hover {
  color: var(--brand-700);
  background: var(--brand-50);
}

.cookie-consent__panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-consent__panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.cookie-consent__panel-dialog {
  position: relative;
  width: 100%;
  max-width: 28rem;
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.cookie-consent__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0;
}

.cookie-consent__panel-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
}

.cookie-consent__panel-close:hover {
  background: #f1f5f9;
  color: #334155;
}

.cookie-consent__panel-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.cookie-consent__category {
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.cookie-consent__panel-foot {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem 1.25rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

@media (min-width: 640px) {
  .cookie-consent__panel-foot {
    flex-direction: row;
  }
}

.cookie-consent__switch {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.cookie-consent__switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-consent__switch-ui {
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: #cbd5e1;
  transition: background 0.2s;
  position: relative;
}

.cookie-consent__switch-ui::after {
  content: '';
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.cookie-consent__switch input:checked + .cookie-consent__switch-ui {
  background: var(--brand-600);
}

.cookie-consent__switch input:checked + .cookie-consent__switch-ui::after {
  transform: translateX(1.25rem);
}

body.cookie-panel-open {
  overflow: hidden;
}
