/* GT BAU GmbH — first-party consent manager (replaces Borlabs Cookie).
   Self-hosted, no external requests, no dependencies. */

.gtb-consent,
.gtb-consent * {
  box-sizing: border-box;
}

.gtb-consent {
  --gtb-fg: #111111;
  --gtb-muted: #5c5c5c;
  --gtb-bg: #ffffff;
  --gtb-surface: #f7f7f7;
  --gtb-border: #e0e0e0;
  --gtb-accent: #000000;
  --gtb-accent-fg: #ffffff;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  font-family: "Lato", Arial, sans-serif;
  color: var(--gtb-fg);
  font-size: 15px;
  line-height: 1.55;
}

.gtb-consent[data-open="true"] {
  display: block;
}

.gtb-consent__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  animation: gtb-fade 0.2s ease-out;
}

.gtb-consent__dialog {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(720px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--gtb-bg);
  border-radius: 6px 6px 0 0;
  box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.3);
  padding: 28px 28px 24px;
  animation: gtb-rise 0.25s ease-out;
}

@media (min-width: 700px) {
  .gtb-consent__dialog {
    bottom: 50%;
    transform: translate(-50%, 50%);
    border-radius: 6px;
  }
}

@keyframes gtb-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes gtb-rise {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
}

@media (min-width: 700px) {
  @keyframes gtb-rise {
    from { opacity: 0; transform: translate(-50%, calc(50% + 16px)); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .gtb-consent__backdrop,
  .gtb-consent__dialog {
    animation: none;
  }
}

.gtb-consent__title {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.gtb-consent__text {
  margin: 0 0 18px;
  color: var(--gtb-muted);
}

.gtb-consent__text a {
  color: var(--gtb-fg);
  text-decoration: underline;
}

/* --- action buttons ------------------------------------------------------ */

.gtb-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gtb-consent__btn {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 12px 18px;
  border: 1px solid var(--gtb-accent);
  border-radius: 3px;
  background: var(--gtb-bg);
  color: var(--gtb-accent);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.gtb-consent__btn:hover {
  background: var(--gtb-surface);
}

.gtb-consent__btn--primary {
  background: var(--gtb-accent);
  color: var(--gtb-accent-fg);
}

.gtb-consent__btn--primary:hover {
  background: #333333;
}

.gtb-consent__btn--link {
  flex: 0 0 auto;
  min-width: 0;
  border-color: transparent;
  color: var(--gtb-muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  text-decoration: underline;
  padding: 12px 8px;
}

.gtb-consent__btn:focus-visible {
  outline: 2px solid var(--gtb-accent);
  outline-offset: 2px;
}

/* --- per-category detail view -------------------------------------------- */

.gtb-consent__details[hidden] {
  display: none;
}

.gtb-consent__details {
  margin: 4px 0 20px;
  border-top: 1px solid var(--gtb-border);
}

.gtb-consent__group {
  border-bottom: 1px solid var(--gtb-border);
  padding: 16px 0;
}

.gtb-consent__group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.gtb-consent__group-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.gtb-consent__group-desc {
  margin: 6px 0 0;
  color: var(--gtb-muted);
  font-size: 14px;
}

.gtb-consent__group-meta {
  margin: 8px 0 0;
  color: #8a8a8a;
  font-size: 12px;
  word-break: break-word;
}

/* toggle */
.gtb-consent__switch {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  margin-top: 2px;
}

.gtb-consent__switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.gtb-consent__slider {
  position: absolute;
  inset: 0;
  background: #cccccc;
  border-radius: 999px;
  transition: background 0.15s ease;
  pointer-events: none;
}

.gtb-consent__slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.gtb-consent__switch input:checked + .gtb-consent__slider {
  background: var(--gtb-accent);
}

.gtb-consent__switch input:checked + .gtb-consent__slider::before {
  transform: translateX(20px);
}

.gtb-consent__switch input:disabled + .gtb-consent__slider {
  background: #9a9a9a;
  opacity: 0.7;
}

.gtb-consent__switch input:disabled {
  cursor: not-allowed;
}

.gtb-consent__switch input:focus-visible + .gtb-consent__slider {
  outline: 2px solid var(--gtb-accent);
  outline-offset: 2px;
}

.gtb-consent__legal {
  margin: 16px 0 0;
  font-size: 12px;
  color: #8a8a8a;
}

.gtb-consent__legal a {
  color: #8a8a8a;
  text-decoration: underline;
}

.gtb-consent__legal a + a {
  margin-left: 12px;
}
