@font-face {
  font-family: "Kyselka Headline";
  src: url("assets/fonts/KyselkaHeadline-Headline.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kyselka Sans";
  src: url("assets/fonts/KyselkaSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kyselka Sans";
  src: url("assets/fonts/KyselkaSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kyselka Sans";
  src: url("assets/fonts/KyselkaSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.chatbot {
  --jp-brand: #e6215a;
  --jp-brand-dark: #500800;
  --jp-brand-soft: #fbdbdb;
  --jp-green: #00554b;
  --jp-green-dark: #003f38;
  --jp-yellow: #eed665;
  --jp-line: #f2b9ca;
  --jp-ink: #171717;
  --jp-shadow: 0 24px 80px rgba(80, 8, 0, 0.22);
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1900;
  display: grid;
  justify-items: end;
  gap: 12px;
  font-family: "Kyselka Sans", Verdana, Arial, Helvetica, sans-serif;
}

.chatbot * {
  box-sizing: border-box;
}

.chatbot button,
.chatbot input {
  font: inherit;
}

.chatbot-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 198px;
  height: 64px;
  min-width: 60px;
  min-height: 64px;
  padding: 8px 16px 8px 8px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--jp-green), var(--jp-brand));
  box-shadow: var(--jp-shadow);
  cursor: pointer;
  overflow: hidden;
  transform-origin: right center;
  will-change: width, height, padding, gap, border-radius, transform;
  animation: jp-float-button 4s ease-in-out infinite;
  transition:
    width 1250ms cubic-bezier(.16, 1, .3, 1),
    height 1250ms cubic-bezier(.16, 1, .3, 1),
    min-height 1250ms cubic-bezier(.16, 1, .3, 1),
    padding 1250ms cubic-bezier(.16, 1, .3, 1),
    gap 1250ms cubic-bezier(.16, 1, .3, 1),
    border-radius 1250ms cubic-bezier(.16, 1, .3, 1),
    opacity 220ms ease,
    transform 1250ms cubic-bezier(.16, 1, .3, 1),
    box-shadow 320ms ease;
}

.chatbot-toggle:hover {
  animation-play-state: paused;
  transform: translateY(-2px);
  box-shadow: 0 28px 90px rgba(80, 8, 0, 0.3);
}

.chatbot-toggle.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.86);
}

.chatbot-toggle span:first-child {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--jp-brand-dark);
  background: var(--jp-yellow);
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 0 0 0 rgba(238, 214, 101, 0.58);
  transition:
    width 1250ms cubic-bezier(.16, 1, .3, 1),
    height 1250ms cubic-bezier(.16, 1, .3, 1),
    font-size 900ms ease,
    box-shadow 900ms ease;
  animation: jp-pulse-mark 2.8s ease-out infinite;
}

.chatbot-toggle span:last-child {
  position: static;
  width: 112px;
  max-width: 112px;
  padding: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.12;
  opacity: 1;
  pointer-events: none;
  overflow: hidden;
  white-space: nowrap;
  transform: none;
  transition:
    opacity 520ms ease,
    transform 1250ms cubic-bezier(.16, 1, .3, 1),
    width 1150ms cubic-bezier(.16, 1, .3, 1),
    max-width 1150ms cubic-bezier(.16, 1, .3, 1);
}

.chatbot.is-compact .chatbot-toggle {
  width: 60px;
  height: 60px;
  min-height: 60px;
  gap: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--jp-yellow);
}

.chatbot.is-compact .chatbot-toggle span:first-child {
  width: 60px;
  height: 60px;
  color: var(--jp-brand-dark);
  background: var(--jp-yellow);
  font-size: 15px;
  box-shadow: inset 0 0 0 7px rgba(0, 85, 75, 0.82), 0 0 0 1px rgba(80, 8, 0, 0.12);
}

.chatbot.is-compact .chatbot-toggle span:last-child {
  opacity: 0;
  transform: translateX(18px) scale(0.9);
  width: 0;
  max-width: 0;
  overflow: hidden;
}


.chatbot.is-opening-from-compact .chatbot-toggle {
  width: 198px;
  height: 64px;
  min-height: 64px;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--jp-green), var(--jp-brand));
  transform: translateY(-2px);
}

.chatbot.is-opening-from-compact .chatbot-toggle span:first-child {
  width: 48px;
  height: 48px;
  font-size: 16px;
  box-shadow: 0 0 0 8px rgba(238, 214, 101, 0.16);
}

.chatbot.is-opening-from-compact .chatbot-toggle span:last-child {
  width: 112px;
  max-width: 112px;
  opacity: 1;
  transform: none;
}
.chatbot:not(.is-compact) .chatbot-toggle:hover span:last-child,
.chatbot:not(.is-compact) .chatbot-toggle:focus-visible span:last-child {
  opacity: 1;
  transform: none;
}

.chatbot-panel {
  width: min(390px, calc(100vw - 28px));
  height: min(640px, calc(100vh - 110px));
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--jp-shadow);
  transform-origin: right bottom;
  isolation: isolate;
  will-change: opacity, transform, clip-path, border-radius;
  animation: jp-panel-in 720ms cubic-bezier(.16, 1, .3, 1) both;
}

.chatbot-panel.is-opening-from-dot {
  animation: jp-panel-from-dot 760ms cubic-bezier(.2, .9, .2, 1) both;
}

.chatbot-panel[hidden] {
  display: none;
}

.chatbot-panel.is-closing {
  pointer-events: none;
  animation: jp-panel-out 820ms cubic-bezier(.36, 0, .2, 1) both;
}

.chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--jp-green) 0%, var(--jp-green) 38%, var(--jp-brand) 38%, var(--jp-brand) 100%);
}

.chatbot-header p,
.chatbot-header h2 {
  margin: 0;
}

.chatbot-header p {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.86;
}

.chatbot-header h2 {
  margin-top: 3px;
  font-family: "Kyselka Headline", "Kyselka Sans", Verdana, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.chatbot-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.chatbot-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
  background: linear-gradient(180deg, #fff 0%, var(--jp-brand-soft) 100%);
}

.chatbot .message {
  max-width: 92%;
  padding: 11px 12px;
  border-radius: 8px;
  line-height: 1.45;
  white-space: pre-wrap;
  animation: jp-message-in 220ms ease both;
}

.chatbot .message.bot {
  align-self: flex-start;
  border: 1px solid var(--jp-line);
  color: var(--jp-green-dark);
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 85, 75, 0.08);
}

.chatbot .message.user {
  align-self: flex-end;
  color: #fff;
  background: var(--jp-green);
}

.chatbot .message small {
  display: block;
  margin-top: 8px;
  color: #6b6964;
  font-size: 12px;
}

.chatbot .message.user small {
  color: rgba(255, 255, 255, 0.8);
}

.chatbot .message.typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  min-width: 74px;
  min-height: 42px;
}

.chatbot .message.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jp-brand);
  opacity: 0.45;
  animation: jp-typing-dot 950ms ease-in-out infinite;
}

.chatbot .message.typing span:nth-child(2) {
  animation-delay: 140ms;
}

.chatbot .message.typing span:nth-child(3) {
  animation-delay: 280ms;
}

.chatbot-suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 14px;
  border-top: 1px solid var(--jp-line);
  background: #fff;
}

.chatbot-suggestions button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid #d8d2c7;
  border-radius: 999px;
  color: var(--jp-green-dark);
  background: linear-gradient(180deg, #fff, #f9fffe);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.chatbot-suggestions button:hover {
  border-color: var(--jp-brand);
  color: var(--jp-brand-dark);
  transform: translateY(-1px);
}

.chatbot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--jp-line);
  background: #fff;
}

.chatbot-form input {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d8b8c2;
  border-radius: 8px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.chatbot-form input:focus {
  outline: 0;
  border-color: var(--jp-brand);
  box-shadow: 0 0 0 3px rgba(230, 33, 90, 0.14);
}

.chatbot-form button {
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--jp-brand), var(--jp-brand-dark));
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.chatbot-form button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

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

.jp-notice-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: linear-gradient(180deg, #ffffff 0%, #fbdbdb 100%);
}

.jp-notice-card {
  width: min(840px, 100%);
  padding: 38px;
  border-left: 10px solid #00554b;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(80, 8, 0, 0.14);
  font-family: "Kyselka Sans", Verdana, Arial, sans-serif;
}

.jp-notice-card h1 {
  max-width: 720px;
  margin: 0;
  color: #e6215a;
  font-family: "Kyselka Headline", "Kyselka Sans", Verdana, sans-serif;
  font-size: 56px;
  line-height: 0.98;
}

.jp-notice-card p {
  max-width: 720px;
  margin: 18px 0 0;
  color: #003f38;
  font-size: 18px;
  line-height: 1.6;
}

.jp-notice-eyebrow {
  margin: 0 0 12px !important;
  color: #e6215a !important;
  font-size: 13px !important;
  font-weight: 700;
  text-transform: uppercase;
}

.jp-notice-back {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-top: 26px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 85, 75, 0.2);
  border-radius: 8px;
  color: #003f38;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 760px) {
  .chatbot {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .chatbot-toggle {
    width: 178px;
    height: 58px;
    min-height: 58px;
    padding: 8px 14px 8px 8px;
  }

  .chatbot-toggle span:first-child {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .chatbot-toggle span:last-child {
    display: block;
    width: 96px;
    max-width: 96px;
    font-size: 13px;
  }

  .chatbot.is-compact .chatbot-toggle {
    width: 60px;
    height: 60px;
    min-height: 60px;
    gap: 0;
    padding: 0;
    border-radius: 50%;
    background: var(--jp-yellow);
  }

  .chatbot.is-compact .chatbot-toggle span:last-child {
    display: block;
    width: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
  }


  .chatbot.is-opening-from-compact .chatbot-toggle {
    width: 178px;
    height: 58px;
    min-height: 58px;
    padding: 8px 14px 8px 8px;
  }

  .chatbot.is-opening-from-compact .chatbot-toggle span:first-child {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .chatbot.is-opening-from-compact .chatbot-toggle span:last-child {
    width: 96px;
    max-width: 96px;
    opacity: 1;
  }
  .chatbot-panel {
    height: min(620px, calc(100vh - 88px));
  }

  .jp-notice-page {
    align-items: start;
    padding: 24px 18px;
  }

  .jp-notice-card {
    padding: 24px 20px;
  }

  .jp-notice-card h1 {
    font-size: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chatbot,
  .chatbot *,
  .chatbot *::before,
  .chatbot *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@keyframes jp-panel-in {
  0% { opacity: 0; transform: translate(18px, 22px) scale(0.76); filter: blur(5px); }
  70% { opacity: 1; transform: translate(0, -3px) scale(1.01); filter: blur(0); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); filter: blur(0); }
}

@keyframes jp-panel-from-dot {
  0% {
    opacity: 0;
    border-radius: 30px;
    clip-path: circle(30px at calc(100% - 30px) calc(100% - 30px));
    transform: translate(8px, 8px) scale(0.92);
    filter: blur(1px);
  }
  42% {
    opacity: 1;
    border-radius: 18px;
    clip-path: circle(72% at calc(100% - 30px) calc(100% - 30px));
    transform: translate(2px, 2px) scale(0.985);
    filter: blur(0);
  }
  76% {
    opacity: 1;
    border-radius: 10px;
    clip-path: circle(142% at calc(100% - 30px) calc(100% - 30px));
    transform: translate(0, -1px) scale(1.006);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    border-radius: 8px;
    clip-path: circle(150% at calc(100% - 30px) calc(100% - 30px));
    transform: translate(0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes jp-panel-out {
  0% {
    opacity: 1;
    border-radius: 8px;
    clip-path: circle(150% at calc(100% - 30px) calc(100% - 30px));
    transform: translate(0, 0) scale(1);
    filter: blur(0);
  }
  34% {
    opacity: 1;
    border-radius: 12px;
    clip-path: circle(116% at calc(100% - 30px) calc(100% - 30px));
    transform: translate(0, 0) scale(0.995);
    filter: blur(0);
  }
  72% {
    opacity: 0.92;
    border-radius: 18px;
    clip-path: circle(42% at calc(100% - 30px) calc(100% - 30px));
    transform: translate(4px, 4px) scale(0.965);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    border-radius: 30px;
    clip-path: circle(30px at calc(100% - 30px) calc(100% - 30px));
    transform: translate(8px, 8px) scale(0.94);
    filter: blur(1px);
  }
}

@keyframes jp-message-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes jp-typing-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-4px); opacity: 1; }
}

@keyframes jp-float-button {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes jp-pulse-mark {
  0% { box-shadow: 0 0 0 0 rgba(238, 214, 101, 0.58); }
  70% { box-shadow: 0 0 0 10px rgba(238, 214, 101, 0); }
  100% { box-shadow: 0 0 0 0 rgba(238, 214, 101, 0); }
}

