/* titan-consulting.com — cookie choices (consent.js). A card at the bottom left; a bottom sheet on phones.
   Fixed, so it never moves the page; the assistant's launcher sits at the bottom right (chat.css). */

.consent {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 80;
  width: min(420px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 24px 20px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: var(--ink, #1d1d1f);
  border: 1px solid var(--hair, rgba(0, 0, 0, 0.08));
  border-radius: 24px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.35), 0 10px 24px -14px rgba(0, 0, 0, 0.18);
  font-size: 15px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.consent[hidden] {
  display: none;
}
.consent.is-in {
  opacity: 1;
  transform: none;
}
.consent:focus {
  outline: none;
}

.consent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.consent-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.022em;
  color: var(--ink, #1d1d1f);
}
.consent-x {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  margin: -6px -8px 0 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3, #6e6e73);
  cursor: pointer;
}
.consent-x:hover {
  background: var(--canvas, #f5f5f7);
  color: var(--ink, #1d1d1f);
}
.consent-x[hidden] {
  display: none;
}
.consent-text {
  margin: 8px 0 0;
  color: var(--ink-2, #424245);
}
.consent-text a {
  color: var(--coral, #c4402b);
  font-weight: 500;
  text-underline-offset: 3px;
}
.consent-gpc {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--r-sm, 12px);
  background: var(--canvas, #f5f5f7);
  color: var(--ink, #1d1d1f);
  font-size: 14px;
}
.consent-gpc[hidden],
.consent-prefs[hidden],
.consent-actions [hidden] {
  display: none;
}

/* Preferences */
.consent-prefs {
  margin-top: 14px;
  border-top: 1px solid var(--line-2, #e8e8ed);
}
.consent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-2, #e8e8ed);
}
.consent-row-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  cursor: default;
}
label.consent-row-txt {
  cursor: pointer;
}
.consent-row-h {
  font-weight: 600;
  color: var(--ink, #1d1d1f);
}
.consent-row-p {
  font-size: 14px;
  color: var(--ink-3, #6e6e73);
}
.consent-always {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ok-soft, #e6f4ee);
  color: var(--ok, #0b7a5c);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* The switch: a native checkbox (role="switch"), keyboard and screen reader as is. */
.consent-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: var(--line, #d2d2d7);
  cursor: pointer;
  transition: background 0.2s;
}
.consent-switch::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--ease);
}
.consent-switch:checked {
  background: var(--coral, #c4402b);
}
.consent-switch:checked::before {
  transform: translateX(18px);
}
.consent-switch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.consent-switch:focus-visible {
  outline: 2px solid var(--coral, #c4402b);
  outline-offset: 3px;
}

/* Actions: accepting and refusing weigh the same. */
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.consent-actions .btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0.6em 1.1em;
  font-size: 15px;
}
.consent-manage {
  flex: 1 1 100%;
  margin-top: 2px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--coral, #c4402b);
  font-weight: 500;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.consent-manage:hover {
  text-decoration-color: currentColor;
}

/* Phones: a bottom sheet, full width, above the home indicator. */
@media (max-width: 600px) {
  .consent {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 85vh;
    max-height: 85dvh;
    padding: 22px 18px calc(16px + env(safe-area-inset-bottom));
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -18px 50px -20px rgba(0, 0, 0, 0.35);
    transform: translateY(24px);
  }
  .consent-title {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent,
  .consent-switch,
  .consent-switch::before {
    transition: none;
  }
  .consent {
    transform: none;
  }
}
