/* Cookie consent banner and the placeholder shown instead of the Google map. */

.cc {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  /* vh first for old browsers; dvh follows the iOS Safari toolbar as it shows and hides. */
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  /* Keeps the buttons clear of the iPhone home indicator. */
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: #060c22;
  color: #fff;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* The hidden attribute must win over the display rules below. */
.cc[hidden],
.cc [hidden],
.cc-placeholder[hidden] {
  display: none !important;
}

.cc:focus {
  outline: none;
}

.cc__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.cc__title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.cc__text {
  margin: 0 0 12px;
  color: #e0e5fa;
}

.cc__link {
  color: #fff;
  text-decoration: underline;
}

.cc__link:hover,
.cc__link:focus {
  color: #fff;
  text-decoration: none;
}

.cc__settings {
  margin: 0 0 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.cc__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.cc__row-label {
  flex: 1 1 auto;
  min-width: 0;
}

.cc__row-title {
  display: block;
  color: #fff;
}

.cc__row-text {
  display: block;
  color: #e0e5fa;
  font-size: 13px;
}

.cc__locked {
  flex: 0 0 auto;
  font-size: 12px;
  color: #e0e5fa;
  white-space: nowrap;
}

.cc__switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 28px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease-in-out;
}

.cc__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease-in-out;
}

.cc__switch[aria-checked="true"] {
  background: #1a8f4c;
}

.cc__switch[aria-checked="true"]::after {
  transform: translateX(20px);
}

.cc__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.cc-btn {
  /* 44px is the minimum comfortable touch target on phones. */
  min-height: 44px;
  padding: 8px 22px;
  border: 2px solid #fff;
  border-radius: 50px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.cc-btn--solid {
  background: #fff;
  color: #060c22;
}

.cc-btn--ghost {
  background: transparent;
  color: #fff;
}

.cc-btn:hover {
  opacity: 0.85;
}

.cc-btn:focus-visible,
.cc__switch:focus-visible,
.cc__link:focus-visible {
  outline: 3px solid #ffd24d;
  outline-offset: 2px;
}

@media (max-width: 575px) {
  .cc__actions {
    flex-direction: column-reverse;
  }

  .cc-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc__switch,
  .cc__switch::after {
    transition: none;
  }
}

/* Map placeholder: same footprint as the map, so nothing jumps when it loads. */
.cc-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 300px;
  padding: 24px 16px;
  background: #e0e5fa;
  color: #112363;
  text-align: center;
}

.cc-placeholder__text {
  max-width: 460px;
  margin: 0;
}

.cc-placeholder .cc-btn--solid {
  border-color: #112363;
  background: #112363;
  color: #fff;
}

/* An iframe waiting for consent has no address yet and must not leave an empty box. */
iframe[data-consent-src]:not([src]) {
  display: none;
}
