/* Dream Quarters first-party consent tool ("Der Keks-Sheriff").
   Replaces consentmanager.net. Brand tokens: paper #FAF6F0, ink #2C2622,
   leather #6B4226, terracotta #B17457 (#96543B small text), hairline #E7DFD3. */

.dqc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8400;
  background: rgba(44, 38, 34, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.dqc-backdrop.dqc-show {
  opacity: 1;
  pointer-events: auto;
}

.dqc-card {
  position: fixed;
  z-index: 8500;
  left: 50%;
  bottom: 1rem;
  transform: translate(-50%, 16px);
  width: calc(100vw - 2rem);
  max-width: 34rem;
  background: #FAF6F0;
  border: 1px solid #E7DFD3;
  border-radius: 0.875rem;
  box-shadow: 0 16px 48px rgba(44, 38, 34, 0.18);
  padding: 1.4rem 1.4rem 1.15rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  padding-bottom: calc(1.15rem + env(safe-area-inset-bottom, 0));
}
.dqc-card.dqc-show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.dqc-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #2C2622;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}
.dqc-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #5C5248;
  margin: 0 0 1rem;
}

.dqc-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.dqc-btn {
  flex: 1 1 45%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.6rem 1rem;
  transition: background 0.15s;
  font-family: inherit;
}
.dqc-btn-necessary { background: #2C2622; color: #fff; }
.dqc-btn-necessary:hover { background: #443C35; }
.dqc-btn-all { background: #6B4226; color: #fff; }
.dqc-btn-all:hover { background: #54341E; }
.dqc-btn-save { background: #2C2622; color: #fff; }
.dqc-btn-save:hover { background: #443C35; }

.dqc-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin-top: 0.9rem;
}
.dqc-link {
  background: none;
  border: none;
  padding: 0.35rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #96543B;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.dqc-link:hover { color: #6B4226; text-decoration: underline; }
a.dqc-link-mute, .dqc-link-mute { color: #8A7E71; font-weight: 400; }
.dqc-gpc {
  font-size: 0.72rem;
  color: #8A7E71;
  margin-top: 0.6rem;
}

/* Settings layer */
.dqc-cat {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-top: 1px solid #E7DFD3;
}
.dqc-cat:first-of-type { border-top: none; }
.dqc-cat-info { flex: 1; min-width: 0; }
.dqc-cat-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #2C2622;
  margin: 0 0 0.15rem;
}
.dqc-cat-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #5C5248;
  margin: 0;
}
.dqc-always {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3F4A3C;
  white-space: nowrap;
  align-self: center;
}

/* Toggle */
.dqc-switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  align-self: center;
}
.dqc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.dqc-slider {
  position: absolute;
  inset: 0;
  background: #D5C9B8;
  border-radius: 9999px;
  transition: background 0.18s;
  pointer-events: none;
}
.dqc-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(44, 38, 34, 0.3);
  transition: transform 0.18s;
}
.dqc-switch input:checked + .dqc-slider { background: #3F4A3C; }
.dqc-switch input:checked + .dqc-slider::after { transform: translateX(20px); }
.dqc-switch input:focus-visible + .dqc-slider {
  outline: 2px solid #6B4226;
  outline-offset: 2px;
}

/* Floating reopen chip */
.dqc-chip {
  position: fixed;
  z-index: 8000;
  left: 0.9rem;
  bottom: 0.9rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FAF6F0;
  border: 1px solid #E7DFD3;
  box-shadow: 0 2px 10px rgba(44, 38, 34, 0.14);
  font-size: 1.05rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
  padding: 0;
}
.dqc-chip:hover { transform: scale(1.08); }
.dqc-hidden { display: none !important; }

@media (max-width: 480px) {
  .dqc-card { bottom: 0; border-radius: 0.875rem 0.875rem 0 0; width: 100vw; max-width: none; left: 0; transform: translate(0, 16px); }
  .dqc-card.dqc-show { transform: translate(0, 0); }
  .dqc-btn { flex-basis: 100%; }
}

@media print {
  .dqc-card, .dqc-chip, .dqc-backdrop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .dqc-card, .dqc-backdrop, .dqc-chip, .dqc-slider, .dqc-slider::after { transition: none; }
}
