/* Gatsbee - AI event discovery assistant */
.gatsbee {
    --gb-black: #111;
    --gb-gold: #c9a45c;
    --gb-yellow: #fabe06;
    --gb-cream: #f7f1e6;
    --gb-grey: #6b6b6b;
    --gb-line: #e4ddd0;
    font-family: "Raleway", sans-serif;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10050;
    line-height: 1.4;
    color: var(--gb-black);
}

.gatsbee, .gatsbee * { box-sizing: border-box; }
/* Neutralise site-wide element rules (e.g. section/p/button margins); :where() keeps
   specificity at one class so the widget's own rules below still win. */
.gatsbee :where(div, p, form, label, button, textarea, img, span, strong) {
    margin: 0; float: none; clear: none;
}
.gatsbee-panel, .gatsbee-header, .gatsbee-log, .gatsbee-form { padding: 0; }

.gatsbee-sr {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Launcher */
.gatsbee-launcher {
    display: flex; align-items: center; gap: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
}
.gatsbee-launcher img {
    width: 60px; height: 60px; border-radius: 50%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
    transition: scale .15s ease;
    /* gentle hover-in-the-air float + a soft gold "ping" ring */
    animation: gb-float 4s ease-in-out infinite, gb-pulse 2.8s ease-out 1s infinite;
}
.gatsbee-launcher:hover img, .gatsbee-launcher:focus-visible img { scale: 1.08; animation-play-state: paused; }
.gatsbee-launcher-label {
    order: -1; margin-right: 10px; padding: 8px 14px; background: var(--gb-black); color: #fff;
    font-weight: 700; font-size: 13px; box-shadow: 0 4px 12px rgba(0,0,0,.25);
    animation: gb-label-in .5s ease-out .6s both;
}
.gatsbee-label-narrow { display: none; }
.gatsbee.is-open .gatsbee-launcher { display: none; }
.gatsbee-launcher:focus:not(:focus-visible) { outline: none; }
.gatsbee-launcher:focus-visible { outline: 2px solid var(--gb-gold); outline-offset: 3px; }

/* Panel */
.gatsbee-panel {
    width: 350px; height: min(540px, calc(100vh - 32px));
    display: flex; flex-direction: column; background: #fff;
    border: 2px solid var(--gb-black); box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
.gatsbee-panel[hidden] { display: none; }

.gatsbee-header {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    background: var(--gb-black); color: #fff; border-bottom: 3px solid var(--gb-gold);
}
.gatsbee-header-avatar { width: 38px; height: 38px; border-radius: 50%; }
.gatsbee-header-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.gatsbee-header-text strong { font-size: 15px; letter-spacing: .5px; color: var(--gb-gold); text-transform: uppercase; }
.gatsbee-header-text span { font-size: 11px; color: #ddd; }
.gatsbee-close, .gatsbee-new {
    background: transparent; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 6px 8px;
}
.gatsbee-new { font-size: 21px; }

.gatsbee-log {
    flex: 1; min-height: 0; overflow-y: auto; padding: 12px 10px; background: var(--gb-cream);
    display: flex; flex-direction: column; gap: 8px;
}

.gatsbee-msg { max-width: 90%; padding: 8px 10px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.gatsbee-msg.user { align-self: flex-end; background: var(--gb-black); color: #fff; }
.gatsbee-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--gb-line); }
.gatsbee-msg.error { align-self: flex-start; background: #fff3f3; border: 1px solid #e3b4b4; color: #8a1f1f; }

.gatsbee-typing { align-self: flex-start; background: #fff; border: 1px solid var(--gb-line); padding: 9px 12px; font-size: 13px; color: var(--gb-grey); }
.gatsbee-typing i { display: inline-block; width: 6px; height: 6px; margin-left: 3px; border-radius: 50%; background: var(--gb-gold); animation: gb-bounce 1s infinite; }
.gatsbee-typing i:nth-child(2) { animation-delay: .15s; }
.gatsbee-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes gb-bounce { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* Cards */
.gatsbee-cards { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.gatsbee-card { display: flex; gap: 10px; background: #fff; border: 1px solid var(--gb-line); padding: 8px; }
.gatsbee-card-img { flex: 0 0 72px; width: 72px; height: 72px; object-fit: cover; background: #ddd; }
.gatsbee-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gatsbee-card-title { font-weight: 800; font-size: 13px; line-height: 1.25; margin: 0; }
.gatsbee-card-meta { font-size: 11.5px; color: var(--gb-grey); }
.gatsbee-card-price { font-size: 13px; font-weight: 700; }
.gatsbee-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.gatsbee-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; background: var(--gb-yellow); color: #000; }
.gatsbee-tag.dark { background: var(--gb-black); color: #fff; }
.gatsbee-tag.muted { background: #eee; color: #555; }
button.gatsbee-tag { border: 0; font-family: inherit; line-height: inherit; cursor: pointer; }
button.gatsbee-tag.dark:hover, button.gatsbee-tag.dark:focus-visible, button.gatsbee-tag.dark[aria-expanded="true"] { background: var(--gb-yellow); color: #000; }
button.gatsbee-tag:focus-visible { outline: 2px solid var(--gb-gold); outline-offset: 1px; }
.gatsbee-card.has-player { flex-wrap: wrap; }
.gatsbee-card.has-player > .gatsbee-video { flex: 0 0 100%; }
.gatsbee-actions { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.gatsbee-btn {
    display: inline-block; padding: 5px 10px; font-size: 12px; font-weight: 700; text-decoration: none !important;
    border: 1px solid var(--gb-black); color: var(--gb-black); background: #fff; cursor: pointer;
}
.gatsbee-btn:hover { background: var(--gb-black); color: #fff; }
.gatsbee-btn.book { background: var(--gb-yellow); border-color: var(--gb-yellow); color: #000; }
.gatsbee-btn.book:hover { background: #000; border-color: #000; color: var(--gb-yellow); }

.gatsbee-card.offer { border-left: 4px solid var(--gb-yellow); }
.gatsbee-card.media { flex-direction: column; }
.gatsbee-card.page { border-left: 4px solid var(--gb-black); }
.gatsbee-card.mailing { border-left: 4px solid var(--gb-yellow); }
.gatsbee-card-kind { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gb-grey); }
.gatsbee-video { position: relative; width: 100%; padding-top: 56.25%; background: #000; }
.gatsbee-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gatsbee-media-img { width: 100%; max-height: 220px; object-fit: cover; }

.gatsbee-perf-date { flex: 0 0 56px; text-align: center; background: var(--gb-black); color: #fff; padding: 6px 2px; line-height: 1.1; }
.gatsbee-perf-date b { display: block; font-size: 22px; }
.gatsbee-perf-date span { font-size: 11px; text-transform: uppercase; }

/* Suggestions */
.gatsbee-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gatsbee-chip {
    border: 1px solid var(--gb-gold); background: #fff; color: var(--gb-black); font-size: 12px; font-weight: 600; line-height: 1.3;
    padding: 4px 10px; border-radius: 14px; cursor: pointer;
}
.gatsbee-chip:hover { background: var(--gb-gold); color: #fff; }
/* Shortcut chips that are links (set in gatsbee-shortcuts.json) */
a.gatsbee-chip { display: inline-block; text-decoration: none !important; }
/* "highlight": true - for big shows / offer of the day */
.gatsbee-chip.highlight { background: var(--gb-yellow); border-color: var(--gb-yellow); color: #000; font-weight: 800; }
.gatsbee-chip.highlight:hover { background: var(--gb-black); border-color: var(--gb-black); color: var(--gb-yellow); }

/* Input */
.gatsbee-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--gb-line); background: #fff; }
.gatsbee-form textarea {
    flex: 1; resize: none; border: 1px solid #bbb; padding: 7px 9px; font: inherit; font-size: 13px; height: 36px; max-height: 88px; outline: none;
}
.gatsbee-form textarea:focus { border-color: var(--gb-black); }
.gatsbee-send { width: 40px; flex: 0 0 40px; border: 0; background: var(--gb-black); color: var(--gb-yellow); font-size: 18px; cursor: pointer; }
.gatsbee-send:disabled { opacity: .5; cursor: default; }
.gatsbee-disclaimer { margin: 0; padding: 0 8px 6px; font-size: 10px; color: var(--gb-grey); background: #fff; }

@media (max-width: 575px) {
    .gatsbee { right: 12px; bottom: 12px; }
    .gatsbee-launcher img { width: 54px; height: 54px; }
    .gatsbee-launcher-label { margin-right: 8px; padding: 6px 10px; font-size: 12px; }
    .gatsbee-label-wide { display: none; }
    .gatsbee-label-narrow { display: inline; }
    /* Full screen on phones. */
    .gatsbee.is-open { left: 0; right: 0; top: 0; bottom: 0 !important; }
    .gatsbee-panel {
        width: 100vw; height: 100vh; height: 100dvh; max-height: none;
        border: 0; box-shadow: none;
    }
    /* Slightly larger text on phones (+1-2px) for easier reading. */
    .gatsbee-msg, .gatsbee-typing { font-size: 15px; }
    .gatsbee-card-title, .gatsbee-card-price { font-size: 14px; }
    .gatsbee-card-meta { font-size: 12.5px; }
    .gatsbee-tag { font-size: 12px; }
    .gatsbee-btn, .gatsbee-chip { font-size: 13px; }
    .gatsbee-card-kind { font-size: 11.5px; }
    .gatsbee-input, #gatsbee-input { font-size: 15px; }
    .gatsbee-header-text span { font-size: 12px; }
    .gatsbee-disclaimer { font-size: 11px; }
}

/* Gatsbee "thinks" while an answer is loading */
.gatsbee.is-busy .gatsbee-header-avatar { animation: gb-bob .45s ease-in-out infinite alternate; }

/* New messages and cards slide in */
.gatsbee-msg, .gatsbee-cards, .gatsbee-chips, .gatsbee-typing { animation: gb-in .25s ease-out both; }

@keyframes gb-float {
    0%, 100% { transform: translateY(0) rotate(0); }
    25%      { transform: translateY(-4px) rotate(-3deg); }
    50%      { transform: translateY(0) rotate(0); }
    75%      { transform: translateY(-4px) rotate(3deg); }
}
@keyframes gb-pulse {
    0%   { box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 0 rgba(201,164,92,.75); }
    70%  { box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 12px rgba(201,164,92,0); }
    100% { box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 0 rgba(201,164,92,0); }
}
@keyframes gb-label-in {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes gb-bob {
    from { transform: translateY(0) rotate(-6deg); }
    to   { transform: translateY(-3px) rotate(6deg); }
}
@keyframes gb-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .gatsbee *, .gatsbee *::before, .gatsbee *::after { animation: none !important; transition: none !important; }
}
