/* That! Haus - UK PECR & UK GDPR Compliant Cookie Consent */
.th-cookie-banner-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  font-family: inherit;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.th-cookie-banner-wrapper.th-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.th-cookie-banner {
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  color: #f8fafc;
  padding: 24px 20px;
}

@media (min-width: 640px) {
  .th-cookie-banner {
    padding: 28px 36px;
  }
}

.th-cookie-container {
  max-width: 1140px;
  margin: 0 auto;
}

.th-cookie-header {
  margin-bottom: 18px;
}

.th-cookie-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.th-cookie-description {
  font-size: 13.5px;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0 0 10px 0;
  max-width: 780px;
}

.th-cookie-policy-link {
  font-size: 13px;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.th-cookie-policy-link:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

.th-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.th-cookie-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  outline: none;
}

.th-cookie-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.th-cookie-btn-accept {
  background: #ffffff;
  color: #0f172a;
}

.th-cookie-btn-accept:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.th-cookie-btn-necessary {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.12);
}

.th-cookie-btn-necessary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.th-cookie-btn-manage {
  background: transparent;
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.15);
}

.th-cookie-btn-manage:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Preferences Accordion Panel */
.th-cookie-prefs {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
  animation: thCookieFadeIn 0.25s ease;
}

.th-cookie-prefs.th-open {
  display: block;
}

@keyframes thCookieFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.th-cookie-pref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 16px;
}

.th-cookie-pref-info {
  flex: 1;
}

.th-cookie-pref-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.th-cookie-pref-desc {
  font-size: 12px;
  color: #64748b;
  display: block;
  margin-top: 3px;
  line-height: 1.4;
}

.th-cookie-badge-always {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 4px;
}

/* Accessible Switch Toggle */
.th-cookie-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.th-cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.th-cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: 0.2s;
  border-radius: 24px;
}

.th-cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.th-cookie-switch input:checked + .th-cookie-slider {
  background-color: #0284c7;
}

.th-cookie-switch input:focus-visible + .th-cookie-slider {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.th-cookie-switch input:checked + .th-cookie-slider:before {
  transform: translateX(18px);
}

.th-cookie-pref-actions {
  margin-top: 18px;
}
