/* SkyStayTravel — Ask SkyStay header launcher
   Keep in sync with assets/sst-commercial-nav.css (Ask SkyStay block).
   Required on any page that renders a.sst-ai-ask but does not load sst-commercial-nav.css
   (notably sky22-*.html via sst-sky22-bundle.css). */

/* Prevent tall Ask markup from stretching the fixed nav row and dropping the logo */
nav.sst-commercial-nav > a.brand,
nav.sst-commercial-nav > a.sst-brand,
nav.sst-commercial-nav > .nav-r {
  align-self: center;
}
nav.sst-commercial-nav > .nav-r {
  display: flex !important;
  align-items: center;
  gap: 8px;
  max-height: 100%;
}

/* Mobile foundation nav is 2-col — never park .nav-r in implicit column 3 */
@media (max-width: 760px) {
  nav.sst-commercial-nav > .nav-r,
  nav.sst-ts-nav .nav-inner > .nav-r,
  body > nav > .nav-r {
    grid-column: 2 !important;
    justify-self: end;
  }
}

/* Sticky Ask SkyStay launcher — friendly AI chip */
a.sst-ai-ask {
  --sst-ai-ask-size: 42px;
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: var(--sst-ai-ask-size);
  height: var(--sst-ai-ask-size);
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  background:
    radial-gradient(circle at 30% 25%, #ffffff 0%, transparent 42%),
    linear-gradient(145deg, #3b9af5 0%, #0770e3 48%, #0557b0 100%);
  border: 2px solid rgba(255, 209, 102, 0.85);
  box-shadow:
    0 0 0 0 rgba(255, 209, 102, 0.45),
    0 4px 14px rgba(5, 87, 176, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  overflow: visible;
  z-index: 320;
  animation: sst-ai-ask-pulse 2.8s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
a.sst-ai-ask:hover,
a.sst-ai-ask:focus-visible {
  outline: none;
  transform: translateY(-1px) scale(1.05);
  filter: brightness(1.05);
  box-shadow:
    0 0 0 4px rgba(255, 209, 102, 0.28),
    0 8px 20px rgba(5, 87, 176, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: none;
}
a.sst-ai-ask .sst-ai-ask__icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
a.sst-ai-ask .sst-ai-ask__icon svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}
a.sst-ai-ask .sst-ai-ask__bubble {
  position: absolute !important;
  top: calc(100% + 12px);
  right: -4px;
  left: auto;
  z-index: 400;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: min(240px, calc(100vw - 24px));
  white-space: nowrap;
  padding: 9px 14px 9px 12px;
  border-radius: 16px 16px 6px 16px;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #0f172a;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid rgba(7, 112, 227, 0.16);
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 209, 102, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.96);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  animation: sst-ai-ask-pop 5.5s cubic-bezier(0.22, 1, 0.36, 1) 0.7s 1 both;
}
a.sst-ai-ask .sst-ai-ask__bubble::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 16px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid rgba(7, 112, 227, 0.16);
  border-top: 1px solid rgba(7, 112, 227, 0.16);
  transform: rotate(45deg);
}
a.sst-ai-ask .sst-ai-ask__bubble-spark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(145deg, #ffd166, #f5c84a);
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
a.sst-ai-ask .sst-ai-ask__bubble-text {
  display: block;
}
@keyframes sst-ai-ask-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(255, 209, 102, 0.4),
      0 4px 14px rgba(5, 87, 176, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(255, 209, 102, 0),
      0 4px 14px rgba(5, 87, 176, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
}
@keyframes sst-ai-ask-pop {
  0%, 100% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.96);
  }
  8% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1.03);
  }
  14%, 72% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
}
a.sst-ai-ask:hover .sst-ai-ask__bubble,
a.sst-ai-ask:focus-visible .sst-ai-ask__bubble {
  animation: none;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
nav .nav-r,
nav.sst-commercial-nav,
nav.sst-ts-nav {
  overflow: visible;
}
@media (max-width: 760px) {
  a.sst-ai-ask {
    --sst-ai-ask-size: 44px;
    border-width: 2px;
    box-shadow:
      0 0 0 0 rgba(255, 209, 102, 0.4),
      0 6px 16px rgba(5, 87, 176, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
  a.sst-ai-ask .sst-ai-ask__icon {
    width: 23px;
    height: 23px;
  }
  a.sst-ai-ask .sst-ai-ask__bubble {
    right: 0;
    top: calc(100% + 10px);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 9px 12px 9px 10px;
    border-radius: 14px 14px 6px 14px;
    max-width: min(220px, calc(100vw - 20px));
    animation: sst-ai-ask-pop 7s cubic-bezier(0.22, 1, 0.36, 1) 0.5s 1 both;
  }
}
@media (prefers-reduced-motion: reduce) {
  a.sst-ai-ask,
  a.sst-ai-ask .sst-ai-ask__bubble {
    animation: none;
  }
}

/* Ask SkyStay — mobile drawer card (must beat #mobile-nav a ID specificity) */
#mobile-nav a.sst-ai-ask-mob,
.mobile-nav a.sst-ai-ask-mob,
#s22-mob-nav a.sst-ai-ask-mob,
#art-mob-nav a.sst-ai-ask-mob,
a.sst-ai-ask-mob {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  margin: 12px 0 8px;
  padding: 14px 16px 15px;
  border-radius: 16px;
  text-decoration: none;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.22) 0%, transparent 42%),
    linear-gradient(135deg, #0b1f3a 0%, #0557b0 48%, #0770e3 100%);
  border: 1px solid rgba(255, 209, 102, 0.45);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 12px 28px rgba(5, 87, 176, 0.32);
  color: #fff;
  position: relative;
  flex-shrink: 0;
  overflow: visible;
}
#mobile-nav a.sst-ai-ask-mob::after,
.mobile-nav a.sst-ai-ask-mob::after,
#s22-mob-nav a.sst-ai-ask-mob::after,
#art-mob-nav a.sst-ai-ask-mob::after,
a.sst-ai-ask-mob::after {
  content: "✦";
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 1rem;
  color: #ffd166;
  opacity: 0.9;
  pointer-events: none;
}
#mobile-nav a.sst-ai-ask-mob .sst-ai-ask-mob-title,
.mobile-nav a.sst-ai-ask-mob .sst-ai-ask-mob-title,
#s22-mob-nav a.sst-ai-ask-mob .sst-ai-ask-mob-title,
#art-mob-nav a.sst-ai-ask-mob .sst-ai-ask-mob-title,
a.sst-ai-ask-mob .sst-ai-ask-mob-title {
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.2;
  padding-right: 1.4rem;
}
#mobile-nav a.sst-ai-ask-mob .sst-ai-ask-mob-desc,
.mobile-nav a.sst-ai-ask-mob .sst-ai-ask-mob-desc,
#s22-mob-nav a.sst-ai-ask-mob .sst-ai-ask-mob-desc,
#art-mob-nav a.sst-ai-ask-mob .sst-ai-ask-mob-desc,
a.sst-ai-ask-mob .sst-ai-ask-mob-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  max-width: 36ch;
}
#mobile-nav a.sst-ai-ask-mob:hover,
.mobile-nav a.sst-ai-ask-mob:hover,
#s22-mob-nav a.sst-ai-ask-mob:hover,
#art-mob-nav a.sst-ai-ask-mob:hover,
a.sst-ai-ask-mob:hover,
#mobile-nav a.sst-ai-ask-mob:focus-visible,
.mobile-nav a.sst-ai-ask-mob:focus-visible,
#s22-mob-nav a.sst-ai-ask-mob:focus-visible,
#art-mob-nav a.sst-ai-ask-mob:focus-visible,
a.sst-ai-ask-mob:focus-visible {
  outline: none;
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 14px 32px rgba(5, 87, 176, 0.38),
    0 0 0 2px rgba(255, 209, 102, 0.35);
}
#mobile-nav a.sst-ai-ask-mob:active,
.mobile-nav a.sst-ai-ask-mob:active,
#s22-mob-nav a.sst-ai-ask-mob:active,
#art-mob-nav a.sst-ai-ask-mob:active {
  filter: brightness(0.98);
}

/* Phase 2 — Sky22 / dest "Plan this trip" uses Ask soft-primary (outline + gold hint) */
body.sst-dest-page a.btn.soft[data-sst-plan-trip],
body.sst-page-stays-dest a.btn.soft[data-sst-plan-trip],
body.sst-dest-page a.btn.soft[href*="assistant.html"],
body.sst-page-activities-dest a[href*="assistant.html"].btn.soft {
  background: #fff !important;
  color: #0557b0 !important;
  border: 1.5px solid #0770e3 !important;
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.35);
}
