/* Trip advisor chat: floating launch button and panel. */
:root {
  --gb-parchment: #f4ead5;
  --gb-parchment-deep: #e8d9b8;
  --gb-ink: #2a2118;
  --gb-ink-soft: #5a4a3a;
  --gb-garnet: #6b1d2a;
  --gb-emerald: #1f4d3a;
  --gb-gold: #b8892d;
  --gb-gold-light: #d4a84b;
  --gb-shadow: rgba(42, 33, 24, 0.28);
  --gb-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --gb-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body.has-goldberry {
  --gb-fab-clearance: calc(4.25rem + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 759px) {
  body.has-goldberry {
    padding-bottom: max(var(--gb-fab-clearance), env(safe-area-inset-bottom, 0px));
  }
}

#goldberry-root {
  position: relative;
  z-index: 40;
  pointer-events: none;
}
#goldberry-root > * {
  pointer-events: auto;
}

.gb-launch {
  position: fixed;
  right: 1rem;
  bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  z-index: 41;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(107, 29, 42, 0.35);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8e8, var(--gb-parchment));
  color: var(--gb-garnet);
  font-family: var(--gb-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 22px var(--gb-shadow);
  transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s linear;
}
.gb-launch:hover {
  transform: translateY(-2px);
  border-color: var(--gb-gold);
}
.gb-launch:focus-visible {
  outline: 2px solid var(--gb-gold-light);
  outline-offset: 3px;
}
.gb-launch[aria-expanded="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.6rem);
}
.gb-launch-label {
  white-space: nowrap;
}

@media (max-width: 719px) {
  .gb-launch {
    right: 0.7rem;
    min-height: 2.75rem;
    padding: 0.6rem 0.95rem;
  }
}

.gb-panel {
  position: fixed;
  right: 1rem;
  bottom: calc(4.4rem + env(safe-area-inset-bottom, 0px));
  z-index: 42;
  width: min(22.5rem, calc(100vw - 1.4rem));
  height: min(34rem, calc(100dvh - 6.5rem));
  display: flex;
  flex-direction: column;
  background: var(--gb-parchment);
  border: 1px solid rgba(184, 137, 45, 0.45);
  border-radius: 18px;
  box-shadow: 0 18px 40px var(--gb-shadow);
  overflow: hidden;
  color: var(--gb-ink);
  font-family: var(--gb-sans);
}
.gb-panel[hidden] {
  display: none !important;
}
@media (min-width: 900px) {
  .gb-panel {
    width: min(26rem, calc(100vw - 2rem));
    height: min(44rem, calc(100dvh - 7rem));
  }
}
@media (max-width: 759px) {
  .gb-panel {
    right: 0.55rem;
    left: 0.55rem;
    width: auto;
    bottom: calc(3.4rem + env(safe-area-inset-bottom, 0px));
    height: min(70dvh, calc(100dvh - 5rem - env(safe-area-inset-bottom, 0px)));
  }
}

.gb-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid rgba(184, 137, 45, 0.35);
  background: linear-gradient(180deg, #fff6e0, var(--gb-parchment-deep));
}
.gb-head-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(184, 137, 45, 0.55);
  background: #fff;
  flex: 0 0 auto;
}
.gb-head-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.gb-head-copy h2 {
  margin: 0;
  font-family: var(--gb-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gb-garnet);
  line-height: 1.15;
}
.gb-subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  color: var(--gb-ink-soft);
}
.gb-close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--gb-ink);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.gb-close:hover {
  background: rgba(107, 29, 42, 0.08);
}
.gb-close:focus-visible {
  outline: 2px solid var(--gb-gold-light);
  outline-offset: 2px;
}

.gb-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.gb-log {
  padding: 0.9rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.gb-msg {
  max-width: 92%;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.45;
}
.gb-msg p {
  margin: 0;
}
.gb-msg p + p {
  margin-top: 0.5rem;
}
.gb-msg a {
  color: var(--gb-garnet);
  font-weight: 600;
}
.gb-msg-bot {
  align-self: flex-start;
  display: flex;
  gap: 0.55rem;
  background: transparent;
  padding: 0;
  max-width: 100%;
}
.gb-msg-avatar {
  width: 42px;
  height: 74px;
  object-fit: contain;
  object-position: center bottom;
  border: 0;
  border-radius: 0;
  flex: 0 0 auto;
  margin-top: 0.1rem;
  background: transparent;
  filter: drop-shadow(0 2px 3px rgba(42, 33, 24, 0.22));
}
.gb-msg-body {
  background: #efe3c8;
  border: 1px solid rgba(184, 137, 45, 0.22);
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  color: var(--gb-ink);
  min-width: 0;
}
.gb-msg-user {
  align-self: flex-end;
  background: var(--gb-garnet);
  color: var(--gb-parchment);
  border-radius: 14px 14px 4px 14px;
}
.gb-msg-user p {
  color: inherit;
}
.gb-typing .gb-msg-body {
  font-style: italic;
  color: var(--gb-ink-soft);
}

.gb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.15rem 0.95rem 0.55rem;
}
.gb-chip {
  border: 1px solid rgba(31, 77, 58, 0.35);
  background: #f8f0dc;
  color: var(--gb-emerald);
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  font-family: var(--gb-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}
.gb-chip:hover {
  background: #e4f0e2;
  border-color: var(--gb-emerald);
}
.gb-chip:focus-visible {
  outline: 2px solid var(--gb-gold-light);
  outline-offset: 2px;
}

.gb-compose {
  display: flex;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem 0.35rem;
  border-top: 1px solid rgba(184, 137, 45, 0.28);
  background: rgba(255, 248, 232, 0.7);
  align-items: flex-end;
}
.gb-compose textarea {
  flex: 1 1 auto;
  resize: none;
  min-height: 2.45rem;
  max-height: 6.5rem;
  border: 1px solid rgba(42, 33, 24, 0.18);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font-family: var(--gb-sans);
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--gb-ink);
  background: #fffdf6;
}
.gb-compose textarea:focus {
  outline: 2px solid rgba(184, 137, 45, 0.55);
  outline-offset: 1px;
}
.gb-send {
  border: 0;
  border-radius: 12px;
  background: var(--gb-emerald);
  color: var(--gb-parchment);
  font-family: var(--gb-sans);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 0.95rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.gb-send:hover {
  filter: brightness(1.08);
}
.gb-send:disabled {
  opacity: 0.55;
  cursor: default;
}
.gb-send:focus-visible {
  outline: 2px solid var(--gb-gold-light);
  outline-offset: 2px;
}

.gb-foot {
  margin: 0;
  padding: 0.2rem 0.95rem 0.65rem;
  font-size: 0.72rem;
  color: var(--gb-ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  background: rgba(255, 248, 232, 0.7);
}
.gb-foot-sep {
  opacity: 0.55;
}
.gb-foot-action {
  border: 0;
  background: transparent;
  color: var(--gb-garnet);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gb-foot a.gb-foot-action {
  color: var(--gb-garnet);
}

.gb-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.gb-chat-open {
  overflow: hidden;
}
@media (min-width: 760px) {
  body.gb-chat-open {
    overflow: auto;
  }
}

/* In-page open buttons */
.gb-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  background: var(--gb-garnet);
  color: var(--gb-parchment);
  font-family: var(--gb-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  text-decoration: none;
}
.gb-open-btn:hover {
  filter: brightness(1.06);
}
.gb-open-btn:focus-visible {
  outline: 2px solid var(--gb-gold-light);
  outline-offset: 3px;
}
