:root {
  --aite-ink: #11233f;
  --aite-muted: #66748d;
  --aite-surface: #ffffff;
  --aite-surface-soft: #f7fafc;
  --aite-accent: #0e9f8a;
  --aite-accent-deep: #0b6b6a;
  --aite-navy: #163764;
  --aite-border: rgba(17, 35, 63, 0.1);
  --aite-shadow: 0 28px 64px rgba(17, 35, 63, 0.16);
}

.aite-chat-shell {
  position: relative;
  isolation: isolate;
  max-width: 980px;
  margin: 2rem auto;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--aite-ink);
}

.aite-chat-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--aite-border);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(14, 159, 138, 0.18), transparent 26%),
    radial-gradient(circle at bottom left, rgba(22, 55, 100, 0.12), transparent 30%),
    linear-gradient(160deg, #ffffff 0%, #f7fbff 46%, #fdf6ea 100%);
  box-shadow: var(--aite-shadow);
}

.aite-chat-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0, rgba(255, 255, 255, 0) 20%),
    linear-gradient(transparent 31px, rgba(17, 35, 63, 0.018) 32px);
  background-size: auto, 100% 32px;
  opacity: 0.55;
}

.aite-chat-panel__header,
.aite-chat-panel__footer {
  position: relative;
  z-index: 1;
  padding: 1.45rem 1.5rem;
}

.aite-chat-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(17, 35, 63, 0.08);
}

.aite-kicker {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aite-accent-deep);
}

.aite-status-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(14, 159, 138, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--aite-accent-deep);
  font-size: 0.84rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.aite-status-pill__text {
  white-space: nowrap;
}

.aite-status-pill__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.78rem;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--aite-navy), #2b598f);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(22, 55, 100, 0.22);
}

.aite-status-pill__link:hover,
.aite-status-pill__link:focus {
  color: #ffffff;
  text-decoration: none;
}

.aite-chat-messages {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 54vh;
  padding: 1.5rem;
  overflow-y: auto;
}

.aite-message {
  display: flex;
}

.aite-message--user {
  justify-content: flex-end;
}

.aite-message__bubble {
  width: fit-content;
  max-width: min(720px, 94%);
  padding: 1rem 1.1rem;
  border: 1px solid rgba(17, 35, 63, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 36px rgba(17, 35, 63, 0.08);
  backdrop-filter: blur(10px);
}

.aite-message--assistant .aite-message__bubble {
  border-top-left-radius: 10px;
}

.aite-message--user .aite-message__bubble {
  border-top-right-radius: 10px;
  background: linear-gradient(145deg, #173967, #2b598f);
  color: #ffffff;
  border-color: transparent;
}

.aite-message__bubble strong {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
}

.aite-message__bubble p,
.aite-message__bubble ul {
  margin: 0.65rem 0 0;
}

.aite-message__bubble ul {
  padding-left: 1.2rem;
}

.aite-chat-answer ul li + li {
  margin-top: 0.35rem;
}

.aite-message.is-loading .aite-message__bubble {
  color: var(--aite-muted);
  font-style: italic;
}

.aite-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.aite-suggestion {
  border: 1px solid rgba(17, 35, 63, 0.09);
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 252, 0.96));
  color: var(--aite-ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.aite-suggestion:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 159, 138, 0.28);
  color: #0f2340;
  box-shadow: 0 10px 24px rgba(17, 35, 63, 0.08);
}

.aite-suggestion:focus {
  color: #0f2340;
}

.aite-chat-panel__footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(17, 35, 63, 0.08);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(12px);
}

.aite-usage {
  margin-bottom: 0.85rem;
  color: var(--aite-muted);
  font-size: 0.92rem;
}

.aite-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.9rem;
  align-items: end;
}

.aite-chat-form textarea,
.aite-email-form input {
  width: 100%;
  padding: 1rem 1rem;
  border: 1px solid rgba(17, 35, 63, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  font: inherit;
  color: var(--aite-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.aite-chat-form textarea {
  min-height: 48px;
  resize: vertical;
}

.aite-chat-form textarea:focus,
.aite-email-form input:focus {
  outline: none;
  border-color: rgba(14, 159, 138, 0.45);
  box-shadow: 0 0 0 4px rgba(14, 159, 138, 0.12);
}

.aite-chat-form button,
.aite-email-form button {
  border: 0;
  border-radius: 20px;
  padding: 1rem 1.25rem;
  background: linear-gradient(145deg, var(--aite-accent), var(--aite-accent-deep));
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(11, 107, 106, 0.26);
}

.aite-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px solid rgba(17, 35, 63, 0.12);
  border-radius: 20px;
  padding: 0.95rem 1.25rem;
  background: rgba(255, 255, 255, 0.86);
  color: var(--aite-navy);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(17, 35, 63, 0.08);
}

.aite-secondary-action:hover,
.aite-secondary-action:focus {
  color: var(--aite-navy);
  text-decoration: none;
  border-color: rgba(14, 159, 138, 0.26);
}

.aite-chat-form textarea:disabled,
.aite-chat-form button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.aite-chat-answer__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: rgba(14, 159, 138, 0.12);
  color: var(--aite-accent-deep);
  font-weight: 800;
  text-decoration: none;
}

.aite-generated-content a.aite-affiliate-link {
  position: relative;
  color: var(--aite-accent-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}

.aite-generated-content a.aite-affiliate-link::after {
  content: attr(data-aite-affiliate-preview);
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.8rem);
  z-index: 20;
  width: max-content;
  max-width: min(280px, 75vw);
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(17, 35, 63, 0.08);
  border-radius: 14px;
  background: rgba(17, 35, 63, 0.96);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
  box-shadow: 0 18px 32px rgba(17, 35, 63, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.aite-generated-content a.aite-affiliate-link::before {
  content: "";
  position: absolute;
  left: 1rem;
  bottom: calc(100% + 0.35rem);
  width: 0.7rem;
  height: 0.7rem;
  background: rgba(17, 35, 63, 0.96);
  transform: rotate(45deg) translateY(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.aite-generated-content a.aite-affiliate-link:hover::after,
.aite-generated-content a.aite-affiliate-link:focus::after {
  opacity: 1;
  transform: translateY(0);
}

.aite-generated-content a.aite-affiliate-link:hover::before,
.aite-generated-content a.aite-affiliate-link:focus::before {
  opacity: 1;
  transform: rotate(45deg) translateY(0);
}

.aite-generated-content {
  color: var(--aite-ink);
}

.aite-itinerary-intro {
  margin: 0 0 1.35rem;
}

.aite-generated-content section {
  margin: 0 0 2rem;
}

.aite-generated-content > .aite-hotel-cta,
.aite-generated-content > .aite-tours-cta,
.aite-generated-content > .aite-video-suggestions,
.aite-generated-content > .aite-ad-slot {
  margin: 2.25rem 0;
}

.aite-generated-content > .aite-hotel-cta + .aite-toc {
  margin-top: 0.25rem;
}

.aite-generated-content h2 {
  margin: 0 0 0.9rem;
  font-size: 1.6rem;
  line-height: 1.2;
}

.aite-generated-content h3 {
  margin: 1rem 0 0.45rem;
  font-size: 1.08rem;
  line-height: 1.3;
}

.aite-generated-content p,
.aite-generated-content li {
  line-height: 1.75;
}

.aite-generated-content ul,
.aite-generated-content ol {
  padding-left: 1.2rem;
}

.aite-generated-content .aite-internal-link {
  color: var(--aite-navy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
}

.aite-budget-grid,
.aite-recommendation-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.aite-budget-card,
.aite-recommendation-card {
  padding: 1.1rem 1.15rem;
  border: 1px solid rgba(17, 35, 63, 0.08);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 249, 0.96));
  box-shadow: 0 14px 32px rgba(17, 35, 63, 0.06);
}

.aite-budget-card h3,
.aite-recommendation-card h3 {
  margin-top: 0;
}

.aite-hotel-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.45rem;
  border: 1px solid rgba(14, 159, 138, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(17, 35, 63, 0.98) 0%, rgba(11, 107, 106, 0.96) 58%, rgba(14, 159, 138, 0.96) 100%);
  color: #ffffff;
  box-shadow: 0 22px 48px rgba(17, 35, 63, 0.16);
}

.aite-tours-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.45rem;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 24px;
  background:
    linear-gradient(135deg, #fff8e6 0%, #f4fbff 100%);
  color: var(--aite-ink);
  box-shadow: 0 18px 40px rgba(17, 35, 63, 0.1);
}

.aite-hotel-cta__copy,
.aite-tours-cta__copy {
  min-width: 0;
}

.aite-generated-content .aite-hotel-cta h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.55rem;
}

.aite-generated-content .aite-tours-cta h2 {
  margin: 0;
  color: var(--aite-ink);
  font-size: 1.55rem;
}

.aite-hotel-cta__actions,
.aite-tours-cta__actions,
.aite-hotel-cta > p,
.aite-tours-cta > p {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
}

.aite-hotel-cta__actions > p,
.aite-tours-cta__actions > p {
  margin: 0;
}

.aite-hotel-cta .aite-hotel-cta__button,
.aite-hotel-cta > p .aite-hotel-cta__button {
  flex: 0 0 auto;
  background: #ffffff;
  color: var(--aite-navy) !important;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.aite-tours-cta .aite-tours-cta__button,
.aite-tours-cta > p .aite-tours-cta__button {
  flex: 0 0 auto;
  background: linear-gradient(145deg, #173967, #2b598f);
  color: #ffffff !important;
}

.aite-video-suggestions {
  padding: 1.35rem;
  border: 1px solid rgba(17, 35, 63, 0.09);
  border-radius: 24px;
  background: linear-gradient(145deg, #ffffff 0%, #f4fbff 100%);
  box-shadow: 0 16px 34px rgba(17, 35, 63, 0.07);
}

.aite-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.aite-video-grid > p {
  display: contents;
  margin: 0;
}

.aite-video-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 35, 63, 0.09);
  border-radius: 18px;
  background: #ffffff;
  color: var(--aite-ink);
  text-decoration: none !important;
  box-shadow: 0 12px 26px rgba(17, 35, 63, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.aite-video-card:hover,
.aite-video-card:focus {
  color: var(--aite-ink);
  border-color: rgba(14, 159, 138, 0.28);
  box-shadow: 0 18px 34px rgba(17, 35, 63, 0.12);
  transform: translateY(-2px);
}

.aite-video-card__thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(17, 35, 63, 0.96), rgba(11, 107, 106, 0.9)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 8px, transparent 8px 16px);
}

.aite-video-card__play {
  width: 54px;
  height: 38px;
  border-radius: 12px;
  background: #ff0033;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.aite-video-card__play::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 10px 0 0 21px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #ffffff;
}

.aite-video-card__body {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
}

.aite-video-card__eyebrow {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aite-accent-deep);
}

.aite-video-card__title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.aite-recommendation-card__category,
.aite-day-cta__eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aite-accent-deep);
}

.aite-day-section {
  position: relative;
  padding: 1.45rem;
  border: 1px solid rgba(17, 35, 63, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 30px rgba(17, 35, 63, 0.05);
}

.aite-day-cta {
  margin-top: 1.35rem;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(14, 159, 138, 0.16);
  background:
    radial-gradient(circle at top right, rgba(14, 159, 138, 0.12), transparent 34%),
    linear-gradient(160deg, #f8fffd 0%, #eef8f5 100%);
}

.aite-day-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.aite-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.88rem 1.15rem;
  border-radius: 999px;
  border: 0;
  color: #ffffff !important;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 16px 28px rgba(17, 35, 63, 0.14);
}

.aite-cta-button.aite-affiliate-link::after,
.aite-cta-button.aite-affiliate-link::before {
  display: none;
}

.aite-cta-button--hotel {
  background: linear-gradient(145deg, var(--aite-accent), var(--aite-accent-deep));
}

.aite-cta-button--tours {
  background: linear-gradient(145deg, #173967, #2b598f);
}

.aite-email-gate[hidden] {
  display: none;
}

.aite-email-gate {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  overflow-y: auto;
  background: rgba(17, 35, 63, 0.56);
  backdrop-filter: blur(6px);
}

.aite-email-gate__card {
  position: relative;
  z-index: 1;
  width: min(470px, 100%);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 28px;
  background: linear-gradient(155deg, #fffef9 0%, #edf8f5 100%);
  box-shadow: var(--aite-shadow);
}

body.aite-email-gate-open {
  overflow: hidden;
}

.aite-email-gate__card h3 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.46rem;
  line-height: 1.2;
}

.aite-email-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.aite-secondary-action--login {
  width: 100%;
}

.aite-email-gate__close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  border: 0;
  background: transparent;
  color: var(--aite-muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.aite-email-gate__notice {
  min-height: 1.3rem;
  margin-top: 0.8rem;
  font-size: 0.92rem;
}

.aite-email-gate__notice.is-success {
  color: #0f7a44;
}

.aite-email-gate__notice.is-error {
  color: #b42318;
}

.aite-ad-slot {
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px dashed rgba(17, 35, 63, 0.16);
}

.aite-theme-sidebar-ad {
  position: sticky;
  top: clamp(1rem, 8vh, 5rem);
  width: 100%;
  margin: 0 0 1.5rem;
}

.aite-theme-sidebar-ad__inner {
  overflow: hidden;
  min-height: 250px;
  padding: 0.85rem;
  border: 1px solid rgba(17, 35, 63, 0.12);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(17, 35, 63, 0.1);
}

.aite-theme-sidebar-ad__inner img,
.aite-theme-sidebar-ad__inner iframe,
.aite-theme-sidebar-ad__inner ins {
  max-width: 100%;
}

.aite-theme-sidebar-ad__inner img {
  height: auto;
}

@media (min-width: 1181px) {
  body.aite-sticky-theme-sidebar #secondary .sidebar-main,
  body.aite-sticky-theme-sidebar .ast-sidebar-main,
  body.aite-sticky-theme-sidebar .sidebar-main {
    position: sticky;
    top: clamp(1rem, 8vh, 5rem);
    align-self: flex-start;
  }

  body.aite-sticky-theme-sidebar .sidebar-main .aite-theme-sidebar-ad {
    position: static;
    top: auto;
  }
}

@media (max-width: 1180px) {
  .aite-theme-sidebar-ad {
    display: none;
  }
}

@media (max-width: 768px) {
  .aite-chat-panel__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .aite-status-pill {
    width: 100%;
    justify-content: space-between;
  }

  .aite-chat-form {
    grid-template-columns: 1fr;
  }

  .aite-message__bubble {
    max-width: 100%;
  }

  .aite-suggestions {
    flex-direction: column;
  }

  .aite-suggestion {
    width: 100%;
    text-align: left;
  }

  .aite-day-section {
    padding: 1.1rem;
  }

  .aite-hotel-cta,
  .aite-tours-cta {
    align-items: stretch;
    flex-direction: column;
    padding: 1.1rem;
  }

  .aite-generated-content .aite-hotel-cta h2,
  .aite-generated-content .aite-tours-cta h2 {
    font-size: 1.3rem;
  }

  .aite-hotel-cta__actions,
  .aite-tours-cta__actions,
  .aite-hotel-cta > p,
  .aite-tours-cta > p {
    width: 100%;
  }

  .aite-hotel-cta .aite-hotel-cta__button,
  .aite-hotel-cta > p .aite-hotel-cta__button,
  .aite-tours-cta .aite-tours-cta__button,
  .aite-tours-cta > p .aite-tours-cta__button {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }

  .aite-day-cta__actions {
    flex-direction: column;
  }
}
