/**
 * SkyStayTravel — cookie consent banner (card + preferences)
 */
.sst-cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 10000;
  display: none;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #374151;
  overflow: hidden;
}

.sst-cookie-banner.show {
  display: flex;
}

.sst-cookie-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 16px;
}

.sst-cookie-banner__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sst-cookie-banner__icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0557b0;
}

.sst-cookie-banner__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sst-cookie-banner__copy {
  flex: 1;
  min-width: 0;
}

.sst-cookie-banner__title {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.sst-cookie-banner__text {
  margin: 0;
  color: #4b5563;
  font-size: 0.84rem;
  line-height: 1.55;
}

.sst-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sst-cookie-banner__actions a,
.sst-cookie-banner__actions button {
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.sst-cookie-accept,
.sst-cookie-banner__btn--primary {
  background: #0770e3;
  color: #fff !important;
  border: 1.5px solid #0770e3;
}

.sst-cookie-accept:hover,
.sst-cookie-banner__btn--primary:hover {
  background: #0557b0;
  border-color: #0557b0;
}

.sst-cookie-banner__btn--secondary {
  background: #fff;
  color: #0557b0;
  border: 1.5px solid rgba(7, 112, 227, 0.35);
}

.sst-cookie-banner__btn--secondary:hover {
  background: #f8fbff;
  border-color: #0770e3;
}

.sst-cookie-banner__btn--tertiary,
.sst-cookie-banner__manage {
  background: transparent;
  color: #0557b0;
  border: 0;
  padding-left: 10px;
  padding-right: 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 750;
}

.sst-cookie-privacy {
  background: transparent;
  color: #0557b0;
  border: 0;
  padding-left: 4px;
  padding-right: 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 750;
  margin-right: auto;
}

.sst-cookie-banner__prefs {
  display: none;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  padding: 14px 18px 16px;
}

.sst-cookie-banner.is-prefs-open {
  max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 760px) {
  body.sst-has-bottom-nav .sst-cookie-banner.is-prefs-open {
    max-height: calc(100dvh - 20px - var(--sst-bottom-nav-stack, 58px) - env(safe-area-inset-bottom, 0px));
  }
}

.sst-cookie-banner.is-prefs-open .sst-cookie-banner__prefs {
  display: block;
}

.sst-cookie-banner__prefs-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.sst-cookie-pref {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.sst-cookie-pref:last-of-type {
  border-bottom: 0;
}

.sst-cookie-pref__meta {
  min-width: 0;
}

.sst-cookie-pref__name {
  margin: 0 0 2px;
  font-size: 0.9rem;
  font-weight: 850;
  color: #0f172a;
}

.sst-cookie-pref__desc {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #64748b;
}

.sst-cookie-pref__lock {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 850;
  color: #0557b0;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}

.sst-cookie-switch {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
  margin-top: 2px;
}

.sst-cookie-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.sst-cookie-switch input:disabled {
  cursor: not-allowed;
}

.sst-cookie-switch__ui {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.15s ease;
  pointer-events: none;
}

.sst-cookie-switch__ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
  transition: transform 0.15s ease;
}

.sst-cookie-switch input:checked + .sst-cookie-switch__ui {
  background: #0770e3;
}

.sst-cookie-switch input:checked + .sst-cookie-switch__ui::after {
  transform: translateX(18px);
}

.sst-cookie-switch input:disabled + .sst-cookie-switch__ui {
  background: #93c5fd;
  opacity: 0.9;
}

.sst-cookie-banner__prefs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

body:not(.sst-dark) .sst-cookie-banner__title {
  color: #0f172a !important;
}

body:not(.sst-dark) .sst-cookie-banner__text,
body:not(.sst-dark) .sst-cookie-pref__desc {
  color: #4b5563 !important;
}

body:not(.sst-dark) .sst-cookie-pref__name,
body:not(.sst-dark) .sst-cookie-banner__prefs-title {
  color: #0f172a !important;
}

@media (max-width: 680px) {
  .sst-cookie-banner {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    border-radius: 16px;
    max-height: min(36vh, 200px);
  }

  .sst-cookie-banner.show:not(.is-prefs-open) {
    overflow: hidden;
  }

  .sst-cookie-banner__icon {
    display: none;
  }

  .sst-cookie-banner__inner {
  .sst-cookie-banner__inner {
    padding: 8px 12px 8px;
    gap: 6px;
  }
  }

  .sst-cookie-banner__title {
    font-size: 0.9rem;
    margin-bottom: 2px;
  }

  .sst-cookie-banner__text {
    font-size: 0.76rem;
    line-height: 1.4;
  }

  /* Two rows rather than four stacked full-width buttons — the tall version
     covered the hero and search band on a phone. */
  .sst-cookie-banner__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .sst-cookie-banner__btn--primary {
    order: 1;
  }

  .sst-cookie-banner__btn--secondary {
    order: 2;
  }

  .sst-cookie-banner__btn--tertiary {
    order: 3;
  }

  .sst-cookie-privacy {
    margin-right: 0;
    order: 4;
    justify-content: center;
  }

  .sst-cookie-banner__btn--primary,
  .sst-cookie-banner__btn--secondary,
  .sst-cookie-banner__btn--tertiary {
    width: 100%;
  }

  .sst-cookie-banner__actions a,
  .sst-cookie-banner__actions button {
    padding-left: 10px;
    padding-right: 10px;
  }

  .sst-cookie-banner__btn--tertiary,
  .sst-cookie-privacy {
    min-height: 28px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
  }

  .sst-cookie-banner__prefs {
    padding: 12px 14px 14px;
  }

  .sst-cookie-banner.is-prefs-open {
    max-height: min(70vh, 560px);
    overflow-y: auto;
  }
}

/* Sit above mobile bottom tab bar when present */
@media (max-width: 760px) {
  body.sst-has-bottom-nav .sst-cookie-banner {
    bottom: calc(10px + var(--sst-bottom-nav-stack, 64px)) !important;
  }

  body.sst-cookie-open.sst-has-bottom-nav {
    scroll-padding-bottom: calc(var(--sst-bottom-nav-stack, 58px) + min(36vh, 200px) + 12px);
  }
}

@media (min-width: 761px) {
  .sst-cookie-banner {
    left: 24px;
    right: auto;
    bottom: 24px;
    width: min(560px, calc(100vw - 48px));
    margin: 0;
  }
}
