/**
 * PrestaHU
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Commercial License
 * you can't distribute, modify or sell this code
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file
 * If you need help please contact info@presta.hu
 *
 * @author    PrestaHU <info@presta.hu>
 * @copyright PrestaHU
 * @license   commercial
 */
.pshuchat[hidden],
.pshuchat [hidden] {
  display: none !important;
}

.pshuchat {
  --pshuchat-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pshuchat-fast: 120ms;
  --pshuchat-base: 200ms;
  --pshuchat-slow: 320ms;
  --pshuchat-surface: var(--bs-body-bg, #fff);
  --pshuchat-line: rgba(0, 0, 0, 0.12);
  --pshuchat-muted: rgba(0, 0, 0, 0.6);
  --pshuchat-online: #1f9d55;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.4;
}

.pshuchat *,
.pshuchat *::before,
.pshuchat *::after {
  box-sizing: inherit;
}

.pshuchat-svg {
  display: block;
  width: 24px;
  height: 24px;
}

/* floating button */
.pshuchat-root {
  position: fixed;
  z-index: 1035;
  bottom: calc(var(--pshuchat-y, 20px) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.pshuchat--right {
  right: var(--pshuchat-x, 20px);
}

.pshuchat--left {
  left: var(--pshuchat-x, 20px);
  align-items: flex-start;
}

.pshuchat-root > * {
  pointer-events: auto;
}

.pshuchat-fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--pshuchat-accent, var(--pshuchat-single, var(--bs-primary, #24b9d7)));
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  transition: transform var(--pshuchat-base) var(--pshuchat-ease), box-shadow var(--pshuchat-base) var(--pshuchat-ease);
}

.pshuchat-fab:hover,
.pshuchat-fab:focus {
  color: #fff;
  text-decoration: none;
}

.pshuchat-fab:hover {
  transform: scale(1.05);
}

.pshuchat-fab:active {
  transform: scale(0.96);
}

.pshuchat-fab:focus-visible,
.pshuchat-pill:focus-visible,
.pshuchat-link:focus-visible,
.pshuchat-iconbtn:focus-visible,
.pshuchat-cta:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.pshuchat-fab .pshuchat-svg {
  width: 28px;
  height: 28px;
}

.pshuchat-fab__icon {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--pshuchat-base) var(--pshuchat-ease), transform var(--pshuchat-base) var(--pshuchat-ease);
}

.pshuchat-fab__icon--close {
  opacity: 0;
  transform: rotate(-90deg);
}

.pshuchat-root.is-open .pshuchat-fab__icon--open {
  opacity: 0;
  transform: rotate(90deg);
}

.pshuchat-root.is-open .pshuchat-fab__icon--close {
  opacity: 1;
  transform: none;
}

/* two channels: their icons take turns on the button, three rounds, then the first one stays */
.pshuchat-cycle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pshuchat-brand);
  color: #fff;
  animation: pshuchat-cycle-a 6s ease-in-out 3 forwards;
}

.pshuchat-cycle--1 {
  opacity: 0;
  animation-name: pshuchat-cycle-b;
}

.pshuchat-fab:hover .pshuchat-cycle,
.pshuchat-fab:focus-visible .pshuchat-cycle {
  animation-play-state: paused;
}

@keyframes pshuchat-cycle-a {
  0%, 42% { opacity: 1; transform: none; }
  50%, 92% { opacity: 0; transform: rotateY(90deg) scale(0.8); }
  100% { opacity: 1; transform: none; }
}

@keyframes pshuchat-cycle-b {
  0%, 42% { opacity: 0; transform: rotateY(-90deg) scale(0.8); }
  50%, 92% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: rotateY(-90deg) scale(0.8); }
}

/* speed-dial (layout A) */
.pshuchat-dial {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pshuchat--left .pshuchat-dial {
  align-items: flex-start;
}

.pshuchat-dial__item {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity var(--pshuchat-base) var(--pshuchat-ease), transform var(--pshuchat-base) var(--pshuchat-ease);
}

.pshuchat-dial.is-open .pshuchat-dial__item {
  opacity: 1;
  transform: none;
}

.pshuchat-dial.is-open .pshuchat-dial__item:nth-last-child(2) {
  transition-delay: 40ms;
}

.pshuchat-dial.is-open .pshuchat-dial__item:nth-last-child(3) {
  transition-delay: 80ms;
}

.pshuchat-dial.is-open .pshuchat-dial__item:nth-last-child(4) {
  transition-delay: 120ms;
}

.pshuchat-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 16px 6px 6px;
  border: 1px solid var(--pshuchat-line);
  border-radius: 999px;
  background: var(--pshuchat-surface);
  color: inherit;
  font: inherit;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--pshuchat-fast) var(--pshuchat-ease);
}

.pshuchat-pill:hover {
  transform: translateX(-2px);
}

.pshuchat--left .pshuchat-pill:hover {
  transform: translateX(2px);
}

.pshuchat-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pshuchat-brand);
  color: #fff;
}

.pshuchat-pill__icon .pshuchat-svg {
  width: 18px;
  height: 18px;
}

/* people panel */
.pshuchat-panel {
  width: min(360px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  overflow: auto;
  border: 1px solid var(--pshuchat-line);
  border-radius: 16px;
  background: var(--pshuchat-surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity var(--pshuchat-base) var(--pshuchat-ease), transform var(--pshuchat-base) var(--pshuchat-ease);
}

.pshuchat--left .pshuchat-panel {
  transform-origin: bottom left;
}

.pshuchat-panel.is-open {
  opacity: 1;
  transform: none;
}

.pshuchat-panel:focus {
  outline: none;
}

.pshuchat-panel__head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--pshuchat-line);
  background: var(--pshuchat-surface);
}

.pshuchat-panel__head [data-pshuchat-back]:not([hidden]) + .pshuchat-panel__title {
  padding-left: 0;
}

.pshuchat-panel__title {
  flex: 1;
  margin: 0;
  font-weight: 700;
}

.pshuchat-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.pshuchat-iconbtn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.pshuchat-people {
  margin: 0;
  padding: 8px;
  list-style: none;
}

.pshuchat-person {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
}

.pshuchat-person + .pshuchat-person {
  margin-top: 2px;
}

.pshuchat-person--single:hover {
  background: rgba(0, 0, 0, 0.04);
}

.pshuchat-person--single .pshuchat-link::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 12px;
}

.pshuchat-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
}

.pshuchat-avatar img,
.pshuchat-avatar__initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.pshuchat-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  border: 2px solid var(--pshuchat-surface);
  border-radius: 50%;
  background: var(--pshuchat-online);
}

.pshuchat-person__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.pshuchat-person__name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pshuchat-person__role {
  color: var(--pshuchat-muted);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

.pshuchat-person__links {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.pshuchat-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pshuchat-brand);
  color: #fff;
  touch-action: manipulation;
  transition: transform var(--pshuchat-fast) var(--pshuchat-ease);
}

.pshuchat-link:hover,
.pshuchat-link:focus {
  color: #fff;
}

.pshuchat-link:hover {
  transform: scale(1.06);
}

.pshuchat-link .pshuchat-svg {
  width: 22px;
  height: 22px;
}

/* greeting bubble */
.pshuchat-bubble {
  max-width: min(260px, calc(100vw - 32px));
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--pshuchat-line);
  border-radius: 14px 14px 4px 14px;
  background: var(--pshuchat-surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.pshuchat--left .pshuchat-bubble {
  border-radius: 14px 14px 14px 4px;
}

/* mobile: offsets of their own, panel as a bottom sheet */
@media (max-width: 767.98px) {
  .pshuchat-root {
    bottom: calc(var(--pshuchat-ym, 16px) + env(safe-area-inset-bottom, 0px));
  }

  .pshuchat--right {
    right: var(--pshuchat-xm, 16px);
  }

  .pshuchat--left {
    left: var(--pshuchat-xm, 16px);
  }

  .pshuchat-panel {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    max-height: 75vh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-width: 1px 0 0;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition-duration: var(--pshuchat-slow);
  }

  .pshuchat-panel.is-open {
    transform: none;
  }

  .pshuchat-root.is-panel .pshuchat-fab,
  .pshuchat-root.is-panel .pshuchat-bubble {
    opacity: 0;
    pointer-events: none;
  }
}

/* product block: C card, D strip */
.pshuchat-block {
  margin: 1rem 0;
}

.pshuchat-block__title {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.pshuchat-block__people {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pshuchat-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--pshuchat-line);
  border-radius: 8px;
}

.pshuchat-card .pshuchat-avatar {
  width: 48px;
  height: 48px;
}

.pshuchat-card__body {
  flex: 1;
  min-width: 0;
}

.pshuchat-card__name,
.pshuchat-card__role,
.pshuchat-card__hours {
  margin: 0;
  overflow-wrap: anywhere;
}

.pshuchat-card__name {
  font-weight: 600;
}

.pshuchat-card__role,
.pshuchat-card__hours {
  color: var(--pshuchat-muted);
  font-size: 0.875em;
}

.pshuchat-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pshuchat-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
}

.pshuchat-cta__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pshuchat-brand);
  color: #fff;
}

.pshuchat-cta__icon .pshuchat-svg {
  width: 18px;
  height: 18px;
}

.pshuchat-block--strip .pshuchat-card {
  align-items: center;
  padding: 8px 12px;
}

.pshuchat-block--strip .pshuchat-card .pshuchat-avatar {
  width: 40px;
  height: 40px;
}

.pshuchat-block--strip .pshuchat-card__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pshuchat-block--strip .pshuchat-card__name {
  flex: 1 1 auto;
}

.pshuchat-block--strip .pshuchat-card__role,
.pshuchat-block--strip .pshuchat-card__hours,
.pshuchat-block--strip .pshuchat-cta__label {
  display: none;
}

.pshuchat-block--strip .pshuchat-card__links {
  margin-top: 0;
}

.pshuchat-block--strip .pshuchat-cta {
  justify-content: center;
  width: 44px;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .pshuchat-cycle {
    animation: none;
  }

  .pshuchat *,
  .pshuchat *::before,
  .pshuchat *::after {
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
  }
}
