/* Czech Royal Hunt — Hunt Advisor (recommendation chat) */

html.ha-open {
  overflow: hidden;
  overscroll-behavior: none;
}
html.ha-open body {
  padding-right: var(--ha-scroll-lock-pad, 0px);
  overscroll-behavior: none;
}
html.ha-open .site-header {
  padding-right: var(--ha-scroll-lock-pad, 0px);
}
@media (pointer: coarse) {
  html.ha-open body,
  html.ha-open .site-header {
    padding-right: 0;
  }
}

/* Homepage custom cursor sits under this widget otherwise (native cursor is forced off). */
body.has-custom-cursor .custom-cursor,
body.has-custom-cursor .cursor {
  z-index: 10300;
}

.ha-root {
  --ha-ink: #f4efe4;
  --ha-ink-dim: rgba(244, 239, 228, 0.78);
  --ha-mute: rgba(244, 239, 228, 0.48);
  --ha-gold: #c89a58;
  --ha-gold-2: #e6c98a;
  --ha-gold-deep: #9a7338;
  --ha-line: rgba(224, 192, 131, 0.28);
  --ha-line-soft: rgba(224, 192, 131, 0.14);
  --ha-surface: #101912;
  --ha-surface-2: #18261c;
  --ha-panel:
    radial-gradient(120% 90% at 0% 0%, rgba(200, 154, 88, 0.1), transparent 42%),
    linear-gradient(165deg, #1c3224 0%, #101912 48%, #0a100c 100%);
  --ha-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ha-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --ha-sans: "Inter", system-ui, sans-serif;
  position: fixed;
  right: calc(clamp(1rem, 3vw, 1.75rem) + var(--ha-scroll-lock-pad, 0px));
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 10250;
  font-family: var(--ha-sans);
  pointer-events: none;
}

.ha-root * {
  box-sizing: border-box;
}

.ha-root button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  touch-action: manipulation;
}

.ha-launcher,
.ha-teaser,
.ha-panel {
  pointer-events: auto;
}

/* ---- Launcher (estate seal) ---- */
.ha-launcher {
  position: relative;
  width: 3.85rem;
  height: 3.85rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ha-gold-2);
  background:
    radial-gradient(circle at 35% 28%, rgba(230, 201, 138, 0.18), transparent 42%),
    radial-gradient(circle at 50% 55%, #1a2a1f 0%, #0c1310 72%);
  border: 1px solid rgba(224, 192, 131, 0.45);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(8, 14, 10, 0.85),
    inset 0 1px 0 rgba(255, 240, 210, 0.12),
    inset 0 -10px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--ha-ease), box-shadow 0.4s ease, border-color 0.3s ease, color 0.3s ease;
  margin-left: auto;
  isolation: isolate;
}
.ha-launcher__ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(224, 192, 131, 0.32);
  box-shadow: inset 0 0 0 1px rgba(8, 14, 10, 0.55);
  pointer-events: none;
}
.ha-launcher__core {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 30%, rgba(200, 154, 88, 0.16), transparent 55%),
    linear-gradient(160deg, #243528, #121c16);
  border: 1px solid rgba(224, 192, 131, 0.18);
  pointer-events: none;
  z-index: 0;
}
.ha-launcher:hover {
  transform: translateY(-3px) scale(1.03);
  color: #f3e1b8;
  border-color: rgba(230, 201, 138, 0.7);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(8, 14, 10, 0.9),
    0 0 28px rgba(200, 154, 88, 0.16),
    inset 0 1px 0 rgba(255, 240, 210, 0.18),
    inset 0 -10px 18px rgba(0, 0, 0, 0.32);
}
.ha-launcher:focus-visible {
  outline: 2px solid var(--ha-gold-2);
  outline-offset: 4px;
}
.ha-launcher__icon {
  position: relative;
  z-index: 1;
  width: 1.28rem;
  height: 1.28rem;
  display: block;
}
.ha-launcher__pulse {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(200, 154, 88, 0.42);
  animation: ha-pulse 2.8s ease-out infinite;
  pointer-events: none;
}
.ha-root.is-open .ha-launcher__pulse,
.ha-root.is-teaser-dismissed .ha-launcher__pulse {
  animation: none;
  opacity: 0;
}
.ha-root.is-open .ha-launcher {
  border-color: rgba(230, 201, 138, 0.55);
  color: #f3e1b8;
}
@keyframes ha-pulse {
  0% { transform: scale(0.94); opacity: 0.7; }
  100% { transform: scale(1.28); opacity: 0; }
}

/* ---- Teaser ---- */
.ha-teaser {
  position: absolute;
  right: 0;
  bottom: calc(3.85rem + 1rem);
  width: min(19.5rem, calc(100vw - 2.5rem));
  padding: 1.25rem 1.25rem 1.15rem;
  color: var(--ha-ink);
  background: var(--ha-panel);
  border: 1px solid rgba(224, 192, 131, 0.34);
  border-radius: 2px;
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(8, 14, 10, 0.7),
    inset 0 1px 0 rgba(255, 240, 210, 0.08);
  display: none;
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  transition: opacity 0.45s var(--ha-ease), transform 0.45s var(--ha-ease);
}
.ha-teaser__frame {
  position: absolute;
  inset: 5px;
  border: 1px solid var(--ha-line-soft);
  pointer-events: none;
}
.ha-teaser::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 201, 138, 0.7), transparent);
  pointer-events: none;
}
.ha-root.is-teaser-visible .ha-teaser {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.ha-launcher__badge {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #f0d9a8, #c89a58);
  box-shadow:
    0 0 0 2px #0f1712,
    0 4px 10px rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 2;
}
.ha-root.has-progress .ha-launcher__badge {
  display: block;
}
.ha-teaser__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid transparent;
  color: var(--ha-mute);
  z-index: 2;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.ha-teaser__close:hover {
  color: var(--ha-gold-2);
  border-color: rgba(224, 192, 131, 0.35);
  background: rgba(255, 250, 240, 0.04);
}
.ha-teaser__eyebrow {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ha-gold);
  margin-bottom: 0.55rem;
  padding-right: 1.8rem;
}
.ha-teaser__rule {
  display: block;
  width: 2.1rem;
  height: 1px;
  margin-bottom: 0.75rem;
  background: linear-gradient(90deg, var(--ha-gold-2), transparent);
}
.ha-teaser__text {
  margin: 0 0 1.05rem;
  font-family: var(--ha-display);
  font-size: 1.32rem;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: var(--ha-ink);
}
.ha-teaser__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.35rem;
  padding: 0 0.95rem;
  border: 1px solid rgba(224, 192, 131, 0.45);
  background:
    linear-gradient(180deg, rgba(230, 201, 138, 0.12), rgba(200, 154, 88, 0.05));
  color: var(--ha-gold-2);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.ha-teaser__cta-arrow {
  width: 0.85rem;
  height: 1px;
  background: currentColor;
  position: relative;
}
.ha-teaser__cta-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1px solid currentColor;
  border-top: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.ha-teaser__cta:hover {
  color: #0f1712;
  border-color: transparent;
  background: linear-gradient(135deg, #e6c98a, #c89a58 55%, #a97736);
  transform: translateY(-1px);
}

/* ---- Panel ---- */
.ha-panel {
  position: absolute;
  right: 0;
  bottom: calc(3.85rem + 1rem);
  width: min(24.5rem, calc(100vw - 2rem));
  height: min(34rem, calc(100vh - 7rem));
  display: flex;
  flex-direction: column;
  color: var(--ha-ink);
  background: var(--ha-panel);
  border: 1px solid rgba(224, 192, 131, 0.34);
  border-radius: 2px;
  box-shadow:
    0 34px 72px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(8, 14, 10, 0.75),
    inset 0 1px 0 rgba(255, 240, 210, 0.07);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.4s var(--ha-ease), transform 0.4s var(--ha-ease);
  overflow: hidden;
}
.ha-panel__frame {
  position: absolute;
  inset: 5px;
  border: 1px solid var(--ha-line-soft);
  pointer-events: none;
  z-index: 1;
}
.ha-panel::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 201, 138, 0.65), transparent);
  z-index: 2;
  pointer-events: none;
}
.ha-root.is-open .ha-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.ha-root.is-open .ha-teaser {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ha-panel__head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem 1.2rem 0.95rem;
  border-bottom: 1px solid var(--ha-line-soft);
  background: linear-gradient(180deg, rgba(8, 14, 10, 0.42), rgba(8, 14, 10, 0.18));
}
.ha-panel__head-copy {
  min-width: 0;
}
.ha-panel__eyebrow {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ha-gold);
  margin-bottom: 0.3rem;
}
.ha-panel__title {
  margin: 0;
  font-family: var(--ha-display);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--ha-ink);
  line-height: 1.08;
  letter-spacing: 0.01em;
}
.ha-panel__close {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--ha-line-soft);
  color: var(--ha-mute);
  flex-shrink: 0;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.ha-panel__close:hover {
  color: var(--ha-gold-2);
  border-color: rgba(224, 192, 131, 0.45);
  background: rgba(255, 250, 240, 0.04);
}

.ha-progress {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.35rem;
  padding: 0.8rem 1.2rem 0;
}
.ha-progress span {
  flex: 1;
  height: 1px;
  background: rgba(224, 192, 131, 0.16);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.ha-progress span.is-done,
.ha-progress span.is-current {
  background: linear-gradient(90deg, var(--ha-gold-deep), var(--ha-gold-2));
}
.ha-progress span.is-current {
  box-shadow: 0 0 10px rgba(200, 154, 88, 0.35);
}
.ha-progress span.is-done {
  opacity: 0.55;
}

.ha-messages {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  padding: 1.05rem 1.2rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.ha-messages::-webkit-scrollbar {
  width: 5px;
}
.ha-messages::-webkit-scrollbar-thumb {
  background: rgba(184, 139, 74, 0.35);
}

.ha-msg {
  max-width: 93%;
  animation: ha-msg-in 0.35s var(--ha-ease);
}
@keyframes ha-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ha-msg--bot {
  align-self: flex-start;
}
.ha-msg--user {
  align-self: flex-end;
}
.ha-msg__bubble {
  padding: 0.8rem 0.95rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ha-ink-dim);
  border: 1px solid var(--ha-line-soft);
  background: rgba(12, 20, 15, 0.72);
  border-radius: 2px;
}
.ha-msg--user .ha-msg__bubble {
  color: #141c16;
  background: linear-gradient(135deg, #e6c98a, #c89a58 60%, #b4863f);
  border-color: transparent;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.ha-msg__label {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ha-gold);
  margin-bottom: 0.35rem;
}

.ha-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}
.ha-chip {
  padding: 0.5rem 0.78rem;
  border: 1px solid rgba(224, 192, 131, 0.26);
  background: rgba(255, 250, 240, 0.03);
  color: var(--ha-ink);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  border-radius: 1px;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.ha-chip:hover,
.ha-chip:focus-visible {
  border-color: rgba(224, 192, 131, 0.55);
  background: rgba(200, 154, 88, 0.12);
  color: var(--ha-gold-2);
  transform: translateY(-1px);
  outline: none;
}
.ha-chip:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.ha-results {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.ha-result {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.7rem;
  padding: 0.55rem;
  border: 1px solid var(--ha-line-soft);
  background: rgba(8, 14, 10, 0.45);
  text-decoration: none;
  color: inherit;
  border-radius: 2px;
  transition: border-color 0.3s ease, transform 0.3s var(--ha-ease), background 0.3s ease;
}
.ha-result:hover {
  border-color: rgba(224, 192, 131, 0.5);
  background: rgba(28, 52, 36, 0.55);
  transform: translateY(-2px);
}
.ha-result__media {
  position: relative;
  overflow: hidden;
  background: #0d1611;
  aspect-ratio: 1;
  border-radius: 1px;
}
.ha-result__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ha-result__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding-right: 0.2rem;
}
.ha-result__meta {
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ha-gold);
}
.ha-result__title {
  font-family: var(--ha-display);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--ha-ink);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ha-result__info {
  font-size: 0.72rem;
  color: var(--ha-mute);
  line-height: 1.35;
}
.ha-result__match {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ha-gold-2);
}

.ha-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.ha-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0 0.95rem;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 1px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.ha-btn:hover {
  transform: translateY(-1px);
}
.ha-btn--gold {
  background: linear-gradient(135deg, #e6c98a, #c89a58 55%, #a97736);
  color: #10180f;
  box-shadow: 0 10px 24px rgba(169, 119, 54, 0.28);
}
.ha-btn--ghost {
  border-color: rgba(224, 192, 131, 0.3);
  color: var(--ha-ink-dim);
  background: transparent;
}
.ha-btn--ghost:hover {
  border-color: rgba(224, 192, 131, 0.5);
  color: var(--ha-gold-2);
}

.ha-panel__foot {
  position: relative;
  z-index: 2;
  padding: 0.8rem 1.2rem 1.05rem;
  border-top: 1px solid var(--ha-line-soft);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ha-mute);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: rgba(8, 14, 10, 0.28);
}
.ha-restart {
  color: var(--ha-gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.62rem;
  font-weight: 600;
}
.ha-restart:hover {
  color: var(--ha-gold-2);
}
.ha-restart[hidden] {
  display: none;
}

.ha-typing {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
  padding: 0.2rem 0;
}
.ha-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ha-gold);
  opacity: 0.35;
  animation: ha-dot 1.1s ease-in-out infinite;
}
.ha-typing i:nth-child(2) { animation-delay: 0.15s; }
.ha-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ha-dot {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 768px) {
  .ha-root {
    right: calc(max(0.85rem, env(safe-area-inset-right, 0px)) + var(--ha-scroll-lock-pad, 0px));
    bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  }

  .ha-teaser {
    width: min(19rem, calc(100vw - 1.75rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    bottom: calc(3.85rem + 0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .ha-teaser__text {
    font-size: 1.2rem;
  }

  .ha-teaser__cta {
    min-height: 2.75rem;
    width: 100%;
  }

  .ha-teaser__close {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .ha-panel {
    width: calc(100vw - 1.75rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    max-width: calc(100vw - 1.75rem);
    height: min(72dvh, calc(100dvh - 6.25rem - env(safe-area-inset-bottom, 0px)));
    bottom: calc(3.85rem + 0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .ha-panel__close {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .ha-launcher {
    width: 3.55rem;
    height: 3.55rem;
  }

  .ha-chip {
    min-height: 2.75rem;
    padding: 0.55rem 0.85rem;
  }

  .ha-btn {
    min-height: 2.75rem;
  }

  .ha-result {
    grid-template-columns: 4rem 1fr;
    gap: 0.6rem;
  }

  .ha-footer-actions .ha-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .ha-root {
    right: calc(max(0.75rem, env(safe-area-inset-right, 0px)) + var(--ha-scroll-lock-pad, 0px));
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  }

  .ha-teaser {
    width: calc(100vw - 1.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    padding: 1.1rem 1rem 1rem;
  }

  .ha-panel {
    width: calc(100vw - 1.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    max-width: calc(100vw - 1.5rem);
    height: min(78dvh, calc(100dvh - 5.75rem - env(safe-area-inset-bottom, 0px)));
    bottom: calc(3.55rem + 0.65rem + env(safe-area-inset-bottom, 0px));
  }

  .ha-panel__head {
    padding: 0.95rem 1rem 0.85rem;
  }

  .ha-messages {
    padding: 0.9rem 1rem 0.75rem;
  }

  .ha-panel__foot {
    padding: 0.7rem 1rem 0.9rem;
  }

  .ha-footer-actions {
    flex-direction: column;
  }

  .ha-footer-actions .ha-btn {
    width: 100%;
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ha-launcher__pulse,
  .ha-msg,
  .ha-typing i,
  .ha-teaser,
  .ha-panel,
  .ha-launcher {
    animation: none !important;
    transition: none !important;
  }
}
