/* ==========================================================================
   Noka Talk — front end
   ========================================================================== */

.nt{
  --nt-brand: #1f5fa8;
  --nt-on-brand: #ffffff;
  --nt-x: 20px;
  --nt-y: 20px;
  --nt-ym: 16px;
  --nt-fab: 56px;

  /* Per channel, written into <style id="nt-vars"> */
  --nt-c: #1f5fa8;
  --nt-on-c: #ffffff;

  position: fixed;
  z-index: 99990;
  bottom: calc(var(--nt-y) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  font-family: inherit;
  /* Layout runs in physical directions: the owner picks a physical
     side, and flex-end inside rtl is the left. Text inside gets the
     page's direction back below (.nt-dir-rtl / .nt-dir-ltr). */
  direction: ltr;
}

/* A physical side on purpose: the owner picks where it sits, and that
   choice should not flip with the language of the page. */
.nt--right{ right: var(--nt-x); left: auto; align-items: flex-end; }
.nt--left { left:  var(--nt-x); right: auto; align-items: flex-start; }

/* ==========================================================================
   The dock (2.6)
   --------------------------------------------------------------------------
   The widgets on one side share one fixed column. Only the dock is
   positioned, so two widgets on the same side can never cover each
   other; the first in priority sits at the bottom.
   ========================================================================== */
.nt-dock{
  direction: ltr;               /* physical layout; see .nt */
  position: fixed;
  z-index: 99990;
  bottom: calc(var(--nt-y, 20px) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
}
.nt-dock--right{ right: var(--nt-x, 20px); left: auto; align-items: flex-end; }
.nt-dock--left { left:  var(--nt-x, 20px); right: auto; align-items: flex-start; }

.nt-dock .nt{
  position: relative;
  bottom: auto;
  right: auto;
  left: auto;
  z-index: 1;
}
/* An open widget's panel must cover the buttons stacked above it. */
.nt-dock .nt.is-open{ z-index: 2; }

/* Both corners in use and not enough width for the labels: the script
   measured a collision. The label is hidden from the eye only; it stays
   the button's accessible name. */
.nt-tight .nt.has-label .nt__fab{ width: var(--nt-fab); padding: 0; }
.nt-tight .nt.has-label .nt__fabLabel{
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Choosing between contacts (2.6)
   ========================================================================== */
.nt__who{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nt__whoLink{
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 12px 6px 6px;
  border: 1px solid #c3c9d2;
  border-radius: 12px;
  color: #14181f;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.nt__whoLink:hover{ border-color: var(--nt-c); color: #14181f; }
.nt__whoLink:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #111b21;
}
.nt__whoMark{
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--nt-c);
  color: var(--nt-on-c);
  font-size: 15px;
}
.nt__whoName{ flex: 1; min-width: 0; }
.nt__whoMark.has-photo{ background: none; overflow: hidden; }
.nt__whoMark img, .nt__icon--photo img{ width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* ==========================================================================
   The list
   ========================================================================== */
.nt__list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nt--right .nt__list{ align-items: flex-end; }
.nt--left  .nt__list{ align-items: flex-start; }
.nt__list[hidden]{ display: none; }

/* 2.12: one channel on this device: it is the button. The floating button
   goes, and the list, one item long, is shown. Same breakpoints as the
   device rules below. Scoped as the theme shield is (.nt-dock .nt), or
   the shield's display wins. */
@media (max-width: 600px){
  .nt-dock .nt.nt--solo-mobile .nt__fab{ display: none; }
  .nt-dock .nt.nt--solo-mobile .nt__list[hidden]{ display: flex; }
}
@media (min-width: 601px) and (max-width: 1024px){
  .nt-dock .nt.nt--solo-tablet .nt__fab{ display: none; }
  .nt-dock .nt.nt--solo-tablet .nt__list[hidden]{ display: flex; }
}
@media (min-width: 1025px){
  .nt-dock .nt.nt--solo-desktop .nt__fab{ display: none; }
  .nt-dock .nt.nt--solo-desktop .nt__list[hidden]{ display: flex; }
}

.nt--horizontal .nt__list{ flex-direction: row; align-items: center; }
/* The first channel nearest the corner, as before. */
.nt--right.nt--horizontal .nt__list{ flex-direction: row-reverse; }

.nt__item{ display: flex; }

.nt__link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Not a link colour: this is a control, and the theme's a{} rules
     must not reach inside it. */
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}
/* The icon sits at the outer edge on either side. */
.nt--right .nt__link{ flex-direction: row-reverse; }

/* ==========================================================================
   One axis for every icon (2.6.1)
   --------------------------------------------------------------------------
   The column is aligned on the icons, not on the text: every channel
   icon's centre sits on the same vertical line as the floating
   button's icon. The button's icon has a slot as wide as the button is
   tall, at the outer edge; the list is pulled in by half the difference
   between that slot and a channel icon.
   ========================================================================== */
.nt--right .nt__list{ margin-right: calc((var(--nt-fab) - 48px) / 2); }
.nt--left  .nt__list{ margin-left:  calc((var(--nt-fab) - 48px) / 2); }

/* Text keeps the page's direction inside the physical layout. */
.nt-dir-rtl .nt__label, .nt-dir-rtl .nt__fabLabel, .nt-dir-rtl .nt__panel, .nt-dir-rtl .nt__sr{ direction: rtl; }
.nt-dir-ltr .nt__label, .nt-dir-ltr .nt__fabLabel, .nt-dir-ltr .nt__panel, .nt-dir-ltr .nt__sr{ direction: ltr; }

.nt__icon{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--nt-c);
  color: var(--nt-on-c);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .26);
  transition: transform .18s ease;
}
.nt__icon img{
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.nt__link:hover .nt__icon{ transform: translateY(-2px); }

.nt__label{
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  background: #ffffff;
  color: #14181f;
  border: 1px solid #c3c9d2;
  border-radius: 5px;
  padding: 7px 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}

/* "On hover and focus only" hides the label visually. It stays in the
   accessibility tree either way — the name a screen reader reads is
   never a styling decision. */
.nt--labels-hover .nt__label{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.nt--labels-hover .nt__link:hover .nt__label,
.nt--labels-hover .nt__link:focus-visible .nt__label{
  position: static;
  width: auto; height: auto;
  padding: 7px 12px; margin: 0;
  overflow: visible;
  clip: auto;
  border: 1px solid #c3c9d2;
}

.nt__item.is-offline .nt__icon{ filter: grayscale(.45); }
.nt__item.is-offline .nt__label{ color: #4b5563; }

/* ==========================================================================
   The floating button
   ========================================================================== */
.nt__fab{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: var(--nt-fab);
  min-height: var(--nt-fab);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--nt-brand);
  color: var(--nt-on-brand);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  justify-content: center;
  transition: transform .2s ease;
}
.nt__fab:hover{ transform: translateY(-2px); }
.nt:not(.has-label) .nt__fab{ width: var(--nt-fab); }
.nt.has-label .nt__fab{ padding: 0; gap: 0; }   /* the icon slot is the gap */
.nt--right .nt__fab{ flex-direction: row-reverse; }
.nt--right.has-label .nt__fabLabel{ padding-left: 16px; }
.nt--left.has-label  .nt__fabLabel{ padding-right: 16px; }

.nt__fabLabel{ font-size: 15px; white-space: nowrap; }
.nt__fabIcon, .nt__fabClose{
  display: flex;
  /* A square slot at the outer edge: its centre is the axis. */
  width: var(--nt-fab);
  height: var(--nt-fab);
  flex: 0 0 var(--nt-fab);
  align-items: center;
  justify-content: center;
}
.nt__fabClose{ display: none; }
.nt.is-open .nt__fabIcon{ display: none; }
.nt.is-open .nt__fabClose{ display: flex; }
/* Open, the label says what the button now does. display:none also takes
   the other text out of the accessibility tree, so the name a screen
   reader hears is always the visible one. */
.nt__fabLabel--close{ display: none; }
.nt.is-open .nt__fabLabel--open{ display: none; }
.nt.is-open .nt__fabLabel--close{ display: inline; }

/* A single-colour ring disappears against one background or the other,
   and the theme behind us is not ours to choose. Two rings always show. */
.nt__fab:focus-visible,
.nt__link:focus-visible .nt__icon,
.nt__cta:focus-visible,
.nt__panelClose:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #111b21;
}
.nt__fab:focus-visible{
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3), 0 0 0 3px #ffffff, 0 0 0 6px #111b21;
}

/* A single bounce on load, never a loop: an animation that repeats and
   cannot be stopped fails WCAG 2.2.2. */
.nt--effect-once .nt__fab{ animation: nt-nudge .7s ease 1.2s 1; }
@keyframes nt-nudge{
  0%, 100% { transform: translateY(0); }
  40%      { transform: translateY(-8px); }
  70%      { transform: translateY(-3px); }
}

/* ==========================================================================
   The chat panel
   ========================================================================== */
.nt__panel{
  position: absolute;
  bottom: calc(100% + 14px);
  width: min(370px, calc(100vw - 32px));
  background: #ffffff;
  color: #14181f;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  text-align: start;
}
.nt--right .nt__panel{ right: 0; left: auto; }
.nt--left  .nt__panel{ left:  0; right: auto; }
.nt__panel[hidden]{ display: none; }

.nt__panelHead{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--nt-h, var(--nt-c));
  color: var(--nt-on-h, var(--nt-on-c));
}
.nt__panelHead .nt__icon{
  width: 42px; height: 42px;
  background: rgba(128, 128, 128, .3);
  color: inherit;
  box-shadow: none;
}
.nt__panelWho{ flex: 1; min-width: 0; }
.nt__panelName{ display: block; font-size: 16px; font-weight: 800; }
.nt__panelStatus{ display: block; font-size: 12.5px; margin-top: 2px; }

.nt__panelClose{
  width: 44px; height: 44px;
  flex: 0 0 44px;
  display: grid; place-items: center;
  background: none; border: 0;
  color: inherit; font-size: 18px; cursor: pointer;
  border-radius: 50%;
}
.nt__panelClose:hover{ background: rgba(128, 128, 128, .3); }

.nt__log{
  padding: 18px 16px;
  max-height: 46vh;
  overflow-y: auto;
  background: #ece5dd;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nt__msg{ display: flex; }
.nt__msg--them{ justify-content: flex-start; }
.nt__msg--me{ justify-content: flex-end; }

.nt__bubble{
  max-width: 84%;
  padding: 11px 14px;
  border-radius: 14px;
  background: #ffffff;
  color: #111b21;
  font-size: 14.5px;
  line-height: 1.6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.nt__msg--me .nt__bubble{ background: #d9fdd3; }

.nt__msg.is-pending{ opacity: 0; transform: translateY(6px); }
.nt__msg.is-in{
  opacity: 1; transform: none;
  transition: opacity .28s ease, transform .28s ease;
}

.nt__typing{
  display: inline-flex; gap: 4px;
  padding: 13px 16px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.nt__typing i{
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: nt-blink 1.2s infinite;
}
.nt__typing i:nth-child(2){ animation-delay: .2s; }
.nt__typing i:nth-child(3){ animation-delay: .4s; }
@keyframes nt-blink{ 0%, 60%, 100% { opacity: .3 } 30% { opacity: 1 } }

.nt__panelFoot{ padding: 14px 16px 16px; background: #ffffff; }
.nt__cta{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 12px;
  background: var(--nt-c);
  color: var(--nt-on-c);
  font-weight: 800;
  font-size: 15.5px;
  text-decoration: none;
}
.nt__cta:hover{ color: var(--nt-on-c); }
.nt__note{
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: #5b6672;
}

.nt__sr{
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Theme shield (2.6.2)
   --------------------------------------------------------------------------
   Themes style every button and link. Hello Elementor's reset, for one,
   sets [type=button] to display:inline-block, a pink border and a white
   or pink background on :hover and :focus. That selector is as strong as
   .nt__fab and loads after us, so it won, and the open button became a
   white box with a pink ✕. Everything the widget depends on is restated
   here under .nt-dock .nt, strong enough to win whatever loads later,
   including in :hover, :focus and :active.
   ========================================================================== */
.nt-dock .nt button,
.nt-dock .nt a{
  margin: 0;
  min-width: 0;
  text-transform: none;
  letter-spacing: normal;
  text-shadow: none;
  font-family: inherit;
  transition: transform .2s ease;
}
.nt-dock .nt .nt__fab,
.nt-dock .nt .nt__fab:hover,
.nt-dock .nt .nt__fab:focus,
.nt-dock .nt .nt__fab:active{
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--nt-fab);
  min-height: var(--nt-fab);
  height: var(--nt-fab);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--nt-brand);
  color: var(--nt-on-brand);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.nt-dock .nt:not(.has-label) .nt__fab{ width: var(--nt-fab); }
.nt-dock .nt.has-label .nt__fab{ width: auto; }
.nt-dock .nt .nt__fabLabel{ font-size: 15px; }

.nt-dock .nt .nt__link,
.nt-dock .nt .nt__link:hover,
.nt-dock .nt .nt__link:focus,
.nt-dock .nt .nt__link:active{
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: none;
}

.nt-dock .nt .nt__panelClose,
.nt-dock .nt .nt__panelClose:focus,
.nt-dock .nt .nt__panelClose:active{
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
}
.nt-dock .nt .nt__panelClose:hover{ background: rgba(128, 128, 128, .3); color: inherit; border: 0; }

.nt-dock .nt .nt__cta,
.nt-dock .nt .nt__cta:hover,
.nt-dock .nt .nt__cta:focus,
.nt-dock .nt .nt__cta:active{
  display: flex;
  background: var(--nt-c);
  color: var(--nt-on-c);
  border: 0;
  text-decoration: none;
}

.nt-dock .nt .nt__whoLink,
.nt-dock .nt .nt__whoLink:focus,
.nt-dock .nt .nt__whoLink:active{
  display: flex;
  background: #ffffff;
  color: #14181f;
  text-decoration: none;
}
.nt-dock .nt .nt__whoLink:hover{ background: #ffffff; color: #14181f; border-color: var(--nt-c); text-decoration: none; }

/* 2.11: a form in the panel. The theme's own form styles apply inside;
   the panel only gives it room and lets a long form scroll. */
.nt__panel--form .nt__form{
  padding: 12px 16px 16px;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #14181f;
  text-align: start;
}
.nt__panel--form .nt__form input:not([type=checkbox]):not([type=radio]):not([type=submit]),
.nt__panel--form .nt__form select,
.nt__panel--form .nt__form textarea{ max-width: 100%; box-sizing: border-box; }
/* A form laid out in columns on its page (Elementor's 25%, 50%) is one
   column in the panel: four fields in 340px would be 85px each. */
.nt__panel--form .elementor-form .elementor-field-group,
.nt__panel--form .elementor-form .elementor-field-type-submit{
  width: 100% !important; max-width: 100% !important; flex-basis: 100% !important;
}

/* ==========================================================================
   Screens
   ========================================================================== */
@media (max-width: 600px){
  .nt{ bottom: calc(var(--nt-ym) + env(safe-area-inset-bottom, 0px)); }
  .nt__panel{ width: calc(100vw - 24px); }
  .nt__log{ max-height: 44vh; }
  .nt--horizontal .nt__list{ flex-direction: column; align-items: inherit; }
  .nt__item--no-mobile{ display: none; }
  .nt--no-mobile{ display: none; }
}
/* 2.11: a tablet is its own device, 601–1024px, the same breakpoints as
   Noka Accessible. It counted as desktop before, and the upgrade gives it
   desktop's setting, so nothing a visitor sees moves. */
@media (min-width: 601px) and (max-width: 1024px){
  .nt__item--no-tablet{ display: none; }
  .nt--no-tablet{ display: none; }
}
@media (min-width: 1025px){
  .nt__item--no-desktop{ display: none; }
  .nt--no-desktop{ display: none; }
}

/* 2.11: the label goes once the visitor has opened the widget. Visually
   only: the text stays the button's name for a screen reader, and open,
   the button still says "Close". */
.nt.nt--label-gone:not(.is-open) .nt__fabLabel--open{
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.nt.nt--label-gone:not(.is-open) .nt__fab{ width: var(--nt-fab); }

/* The stack covers the bottom of the page. On a phone that can hide a
   form's submit button. Added only when the widget is really visible. */
@media (max-width: 600px){
  /* The real height of the docks, measured by the script; 84px only
     until it has measured. */
  body.nt-pad{ padding-bottom: var(--nt-pad, 84px); }
  .nt-dock{ bottom: calc(var(--nt-ym, 16px) + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 380px){
  .nt__bubble{ font-size: 14px; }
  .nt__log{ max-height: 40vh; }
}

/* ==========================================================================
   Reduced motion and forced colours
   ========================================================================== */
@media (prefers-reduced-motion: reduce){
  .nt__fab, .nt__icon, .nt__msg{ transition: none; }
  .nt__fab:hover, .nt__link:hover .nt__icon{ transform: none; }
  .nt--effect-once .nt__fab{ animation: none; }
  .nt__typing i{ animation: none; opacity: .6; }
  .nt__msg.is-pending{ opacity: 1; transform: none; }
}

/* box-shadow is not painted in forced colours, so the double ring is
   replaced by an outline the system does draw. */
@media (forced-colors: active){
  .nt__fab:focus-visible,
  .nt__link:focus-visible .nt__icon,
  .nt__cta:focus-visible,
  .nt__panelClose:focus-visible{
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }
  .nt__panel, .nt__label{ border: 1px solid CanvasText; }
}
