/* Spacekoncept website chat. Placement follows the theme's chat variables when present. */
.skchat-launcher {
  position: fixed;
  z-index: 96;
  right: var(--sk-chat-right, 20px);
  bottom: var(--sk-chat-bottom, calc(1.5rem + 2.9rem + 14px + env(safe-area-inset-bottom)));
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 3.25rem;
  padding: .75rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: #1e1f1b;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 .75rem 1.75rem rgb(0 0 0 / 25%);
  transition: transform .18s ease, background-color .18s ease;
}
.skchat-launcher:hover { background: #3a362f; transform: translateY(-2px); }
.skchat-launcher:focus-visible,
.skchat-close:focus-visible,
.skchat-send:focus-visible,
.skchat-input:focus-visible { outline: 3px solid #c9a66b; outline-offset: 2px; }
.skchat-launcher svg { width: 1.35rem; height: 1.35rem; }

.skchat-panel {
  position: fixed;
  z-index: 97;
  right: var(--sk-chat-right, 20px);
  bottom: var(--sk-chat-panel-bottom, calc(1.5rem + 2.9rem + 14px + 76px + env(safe-area-inset-bottom)));
  display: flex;
  flex-direction: column;
  width: min(23rem, calc(100vw - 2rem));
  height: min(34rem, calc(100dvh - 9rem));
  max-height: var(--sk-chat-panel-max-height, none);
  border: 1px solid #d8d2c4;
  border-radius: 14px;
  background: #fff;
  color: #1e1f1b;
  box-shadow: 0 1.25rem 3rem rgb(0 0 0 / 25%);
  overflow: hidden;
}
.skchat-panel[hidden] { display: none; }
.skchat-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; background: #1e1f1b; color: #fff; }
.skchat-title { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; color: inherit; font-family: inherit; letter-spacing: 0; }
.skchat-close { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
.skchat-close:hover { background: rgb(255 255 255 / 12%); }
.skchat-close svg { width: 1.25rem; height: 1.25rem; }

.skchat-log { flex: 1; overflow-y: auto; padding: 1rem; background: #f7f5ef; }
.skchat-msg { display: flex; margin: 0 0 .6rem; }
.skchat-msg__text { max-width: 85%; margin: 0; padding: .6rem .8rem; border-radius: 12px; font-size: .9375rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.skchat-msg--bot .skchat-msg__text { background: #fff; border: 1px solid #e6e1d6; border-bottom-left-radius: 4px; }
.skchat-msg--user { justify-content: flex-end; }
.skchat-msg--user .skchat-msg__text { background: #765839; color: #fff; border-bottom-right-radius: 4px; }
.skchat-msg--note .skchat-msg__text { background: transparent; border: 0; padding: .1rem .2rem; color: #5c574e; font-size: .8125rem; font-style: italic; }
.skchat-msg--typing .skchat-msg__text { color: #8a8478; letter-spacing: .15em; }

.skchat-form { display: flex; gap: .5rem; align-items: flex-end; padding: .75rem; border-top: 1px solid #e6e1d6; background: #fff; }
.skchat-input { flex: 1; min-height: 2.75rem; max-height: 7rem; padding: .6rem .7rem; border: 1px solid #cfc8b9; border-radius: 10px; font: inherit; font-size: 1rem; line-height: 1.4; resize: none; color: inherit; background: #fff; }
.skchat-send { min-height: 2.75rem; padding: 0 1rem; border: 0; border-radius: 10px; background: #765839; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.skchat-send:hover { background: #5e4630; }
.skchat-send:disabled { opacity: .55; cursor: progress; }
.skchat-privacy { margin: 0; padding: 0 .9rem .7rem; background: #fff; color: #5c574e; font-size: .75rem; line-height: 1.45; }

/* The footer hides the floating buttons; keep the chat closed button in step with them. */
body.sk-utility-footer-visible .skchat-launcher { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
html.skchat-open body.sk-utility-footer-visible .skchat-launcher { opacity: 1; visibility: visible; }

@media (max-width: 767px) {
  .skchat-launcher { padding: .8rem; min-width: 3.25rem; justify-content: center; }
  .skchat-launcher__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .skchat-panel { right: .5rem; left: .5rem; width: auto; bottom: var(--sk-chat-panel-bottom, 6rem); }
}
@media (prefers-reduced-motion: reduce) {
  .skchat-launcher { transition: none; }
  .skchat-launcher:hover { transform: none; }
}
.skchat-form .screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
