/* Styles for the React replacements of the old jQuery plugins (owl carousel, slick, slicknav). */

.fade-slider {
  position: relative;
}
.fade-slider > .owl-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
.fade-slider > .owl-item.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}
.hero__slider.fade-slider .owl-nav button {
  border: none;
  cursor: pointer;
  z-index: 2;
}
.testimonial__slider.fade-slider .owl-dots button {
  border: none;
  padding: 0;
  cursor: pointer;
}

/* Product gallery thumbnails (was slick vertical carousel) */
.product__details__thumb {
  max-height: 536px;
  overflow-y: auto;
}
.gallery-thumb {
  border: 1px solid #e1e1e1;
  margin-bottom: 10px;
  cursor: pointer;
}
.gallery-thumb.active {
  border-color: #ffc446;
}

/* Mobile menu (was slicknav) */
.slicknav_nav {
  list-style: none;
  padding: 0;
}
.slicknav_nav li {
  list-style: none;
}
.slicknav_nav a {
  display: block;
  padding: 7px 0;
  color: #111111;
  font-weight: 600;
}
.slicknav_nav .mobile-submenu {
  padding-left: 15px;
}
.slicknav_nav .mobile-submenu a {
  font-weight: 400;
}

/* Pagination links */
.product__pag a.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Native selects (nice-select was dropped) */
.filter__form form .input__item select,
.services__page__widget__form form select {
  width: 100%;
  height: 50px;
  border: 1px solid #e1e1e1;
  padding-left: 20px;
  font-size: 15px;
  color: #666666;
  background: #fff;
  margin-bottom: 20px;
}

/* ---------- Layout fixes ---------- */

/* Header logo: keep it inside its column; smaller on phones so the menu button has room. */
.header__logo img {
  max-width: 100%;
  height: auto;
}
@media (max-width: 991px) {
  .header .container {
    position: relative;
  }
  .header__logo {
    padding: 12px 56px 12px 0;
  }
  .header__logo img {
    max-height: 48px;
    width: auto;
  }
  .canvas__open {
    top: 50% !important;
    transform: translateY(-50%);
  }
}

/* Product cards: square image that scales with the column. */
.product__item__pic img.product-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
}
.product__item__text h5 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 767px) {
  .product-page .col-6 {
    padding-left: 8px;
    padding-right: 8px;
  }
  .product__item {
    margin-bottom: 28px;
  }
  .product__item__text {
    padding-top: 12px;
  }
  .product__item__text h5 {
    font-size: 14px;
    line-height: 1.35;
    margin-bottom: 4px;
  }
  .product__item__text h6 {
    font-size: 12px;
  }
}

/* Pagination: real spacing between page numbers. */
.product__pag a {
  min-width: 40px;
  padding: 0 8px;
  margin-right: 6px;
  border: 1px solid #e1e1e1;
}
.product__pag a.active {
  background: #1b2839;
  border-color: #1b2839;
  color: #ffffff;
}
.product__pag a.gap {
  border-color: transparent;
}
@media (max-width: 767px) {
  .product__pag {
    float: none;
  }
}

/* Product tabs: one scrollable row on phones instead of four stacked lines. */
@media (max-width: 767px) {
  .product__details__desc__tab .nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .product__details__desc__tab .nav::-webkit-scrollbar {
    display: none;
  }
  .product__details__desc__tab .nav-item {
    flex: 0 0 auto;
    margin-right: 36px;
    white-space: nowrap;
  }
  .product__details__desc__tab .nav-item:after {
    right: -21px;
  }
  .product__details__desc__tab .nav-item .nav-link {
    font-size: 16px;
  }
}

/* Hero slider arrows sit outside the container; on phones keep them inside the screen. */
@media (max-width: 1199px) {
  .hero__slider.fade-slider .owl-nav button {
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 24px;
    margin-top: -22px;
    left: 8px;
  }
  .hero__slider.fade-slider .owl-nav button.owl-next {
    left: auto;
    right: 8px;
  }
  .hero__slider.fade-slider .owl-nav button i,
  .hero__slider.fade-slider .owl-nav button.owl-next i {
    left: 0;
  }
}

/* Rich-text images never overflow their column. */
.blog__details__text img,
.tab-pane img,
.about__text img {
  max-width: 100%;
  height: auto;
}

/* Website forms */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.lead-status {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 500;
}
.lead-status.ok {
  color: #1e8a4c;
}
.lead-status.err {
  color: #c0392b;
}
.footer .lead-status.ok {
  color: #7ee2a8;
}
.footer .lead-status.err {
  color: #ff9b8f;
}
.filter__form .lead-status {
  text-align: right;
}

/* The theme stacks the tabs (display:block) under 480px; keep them as one swipeable row. */
@media (max-width: 767px) {
  .product__details__desc__tab ul.nav {
    display: flex;
    text-align: left;
  }
  .product__details__desc__tab ul.nav .nav-item {
    margin-bottom: 0;
  }
}

/* On phones the slider arrows cover the headline; it still auto-plays. */
@media (max-width: 575px) {
  .hero__slider.fade-slider .owl-nav {
    display: none;
  }
}

/* ---------- Equipment category menu ---------- */
.cat-panel {
  position: sticky;
  top: 20px;
}
.cat-search {
  position: relative;
  margin-bottom: 20px;
}
.cat-search input {
  width: 100%;
  height: 48px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 0 48px 0 16px;
  font-size: 14px;
  color: #1b2839;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cat-search input:focus {
  outline: none;
  border-color: #ffc446;
  box-shadow: 0 0 0 3px rgba(255, 196, 70, 0.25);
}
.cat-search button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #1b2839;
  font-size: 17px;
  cursor: pointer;
}
.cat-search button:hover {
  background: #f6f7f9;
}

.cat-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 10px;
  padding: 20px 14px 14px;
  box-shadow: 0 6px 24px rgba(27, 40, 57, 0.06);
}
.cat-title {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1b2839;
  margin: 0 6px 14px;
  padding-bottom: 12px;
  position: relative;
}
.cat-title:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: #ffc446;
}
.cat-tree,
.cat-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cat-tree li {
  list-style: none;
}
.cat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 7px;
  color: #3d4a5c;
  font-size: 15px;
  line-height: 1.35;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.cat-link:hover {
  background: #f6f7f9;
  color: #1b2839;
  text-decoration: none;
}
.cat-link.active {
  background: #fff8e6;
  border-left-color: #ffc446;
  color: #1b2839;
  font-weight: 600;
}
.cat-name {
  flex: 1;
  min-width: 0;
}
.cat-count {
  flex-shrink: 0;
  min-width: 26px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f1f3f6;
  color: #7a8596;
  font-size: 12px;
  text-align: center;
}
.cat-link.active .cat-count {
  background: #ffc446;
  color: #1b2839;
}

/* Branches: the caret sits in its own column so the link stays clickable. */
.cat-tree details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  cursor: default;
}
.cat-tree details > summary::-webkit-details-marker {
  display: none;
}
.cat-tree details > summary .cat-link {
  flex: 1;
  min-width: 0;
}
.cat-caret {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-left: 2px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}
.cat-caret:hover {
  background: #f6f7f9;
}
.cat-caret:before {
  content: '';
  position: absolute;
  left: 11px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #7a8596;
  border-bottom: 2px solid #7a8596;
  transform: rotate(-45deg);
  transition: transform 0.2s;
}
.cat-tree details[open] > summary .cat-caret:before {
  transform: rotate(45deg);
  top: 8px;
}
.cat-sub {
  margin: 2px 0 6px 14px;
  padding-left: 8px;
  border-left: 1px solid #ececec;
}
.cat-sub .cat-link {
  font-size: 14px;
  padding: 7px 10px;
}

/* Phones: search + swipeable category chips above the products. */
.cat-mobile {
  margin-bottom: 22px;
}
.cat-mobile .cat-search {
  margin-bottom: 14px;
}
.cat-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 -15px;
  padding-left: 15px;
  padding-right: 15px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-chips::-webkit-scrollbar {
  display: none;
}
.cat-chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid #e1e1e1;
  border-radius: 999px;
  background: #fff;
  color: #3d4a5c;
  font-size: 14px;
  white-space: nowrap;
}
.cat-chip:hover {
  text-decoration: none;
  color: #1b2839;
}
.cat-chip.active {
  background: #1b2839;
  border-color: #1b2839;
  color: #fff;
}
.cat-chip span {
  opacity: 0.6;
  font-size: 12px;
  margin-left: 2px;
}
.cat-chips-sub {
  margin-top: 8px;
}
.cat-chips-sub .cat-chip {
  font-size: 13px;
  padding: 5px 12px;
  background: #f6f7f9;
  border-color: #f6f7f9;
}
.cat-chips-sub .cat-chip.active {
  background: #ffc446;
  border-color: #ffc446;
  color: #1b2839;
}
.cat-result {
  font-size: 15px;
  color: #3d4a5c;
  margin-bottom: 20px;
}
.cat-link.in-path {
  color: #1b2839;
  font-weight: 600;
}

/* ---------- Software page: type filter cards + even image cards ---------- */
.soft-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 45px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e1e1e1;
}
.soft-type {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  color: #1b2839;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.soft-type:hover {
  text-decoration: none;
  color: #1b2839;
  border-color: #ffc446;
  box-shadow: 0 8px 24px rgba(27, 40, 57, 0.08);
  transform: translateY(-2px);
}
.soft-type__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  margin: 6px;
  border: 1px solid #ffc446;
  border-radius: 8px;
  transform: rotate(45deg);
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.soft-type__icon i {
  transform: rotate(-45deg);
  color: #ffc446;
  font-size: 20px;
  line-height: 1;
}
.soft-type__icon i:before {
  margin: 0;
  font-size: 22px;
}
.soft-type__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.soft-type__text strong {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.3;
}
.soft-type__text small {
  color: #888888;
  font-size: 13px;
  margin-top: 2px;
}
.soft-type:hover .soft-type__icon,
.soft-type.active .soft-type__icon {
  background: #ffc446;
}
.soft-type:hover .soft-type__icon i,
.soft-type.active .soft-type__icon i {
  color: #ffffff;
}
.soft-type.active {
  border-color: #ffc446;
  background: #fff8e6;
}

/* The theme caps these figures at 310x220; let them fill the column at one ratio. */
.soft-card figure.snip1206 {
  max-width: none;
  max-height: none;
  min-width: 0;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background: #f6f7f9;
}
.soft-card figure.snip1206 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.soft-card .soft__item__text h5 {
  line-height: 1.35;
}
@media (max-width: 575px) {
  .soft-types {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .soft-type {
    gap: 12px;
    padding: 12px;
  }
  .soft-type__icon {
    width: 36px;
    height: 36px;
    margin: 4px;
  }
  .soft-type__icon i:before {
    font-size: 16px;
  }
  .soft-type__text strong {
    font-size: 13px;
  }
}

/* ---------- Header: logo | menu (left) ......... search + phone (right) ---------- */
.hdr {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 86px;
}
.hdr__logo {
  flex-shrink: 0;
  display: block;
  padding: 14px 0;
}
.hdr__logo img {
  height: 58px;
  width: auto;
}
.header .hdr__menu {
  flex: 1;
  min-width: 0;
  margin: 0;
  text-align: left;
}
.header .hdr__menu > ul {
  margin: 0;
  padding: 0;
  white-space: nowrap;
}
/* More space between menu items (theme default is 26px). */
.header .hdr__menu > ul > li {
  margin-right: 38px;
}
.header .hdr__menu > ul > li:last-child {
  margin-right: 0;
}
.hdr__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hdr__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: 8px;
}
.hdr__phone:hover {
  text-decoration: none;
  filter: brightness(0.96);
}

/* Search: an icon that grows into a text box over the menu. */
.hdr-search {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 44px;
}
.hdr-search input {
  position: absolute;
  right: 0;
  top: 0;
  height: 44px;
  width: 44px;
  padding: 0 46px 0 0;
  border: 1px solid transparent;
  border-radius: 22px;
  background: transparent;
  font-size: 15px;
  color: #1b2839;
  opacity: 0;
  pointer-events: none;
  transition: width 0.3s ease, opacity 0.2s ease, padding 0.3s ease, border-color 0.2s;
}
.hdr-search.open input {
  width: 320px;
  padding: 0 46px 0 18px;
  opacity: 1;
  pointer-events: auto;
  background: #fff;
  border-color: #e1e1e1;
  box-shadow: 0 8px 24px rgba(27, 40, 57, 0.1);
  z-index: 5;
}
.hdr-search input:focus {
  outline: none;
  border-color: #ffc446;
  box-shadow: 0 0 0 3px rgba(255, 196, 70, 0.25), 0 8px 24px rgba(27, 40, 57, 0.1);
}
.hdr-search input::-webkit-search-cancel-button {
  display: none;
}
.hdr-search button {
  position: relative;
  z-index: 6;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1b2839;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.hdr-search button:hover {
  background: #f6f7f9;
}
.hdr-search.open button {
  background: #ffc446;
  color: #1b2839;
}

/* Laptop widths: tighten spacing so everything stays on one line. */
@media (max-width: 1199px) {
  .hdr {
    gap: 24px;
  }
  .header .hdr__menu > ul > li {
    margin-right: 24px;
  }
  .hdr__phone {
    padding-left: 14px !important;
    padding-right: 14px !important;
    font-size: 16px !important;
  }
  .hdr-search.open input {
    width: 260px;
  }
}
/* Tablets/phones: logo + menu button; search lives in the slide-out menu. */
@media (max-width: 991px) {
  .hdr {
    min-height: 0;
  }
  .hdr__menu,
  .hdr__actions {
    display: none !important;
  }
  .hdr__logo {
    padding: 12px 56px 12px 0;
  }
  .hdr__logo img {
    height: 48px;
  }
  button.canvas__open {
    background: #fff;
  }
}
.offcanvas-search {
  position: relative;
  margin: 0 0 22px;
}
.offcanvas-search input {
  width: 100%;
  height: 44px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 0 44px 0 14px;
  font-size: 15px;
}
.offcanvas-search button {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #1b2839;
}

/* ---------- Search results page ---------- */
.search-page {
  padding: 30px 0 60px;
}
.search-page__box {
  max-width: 640px;
  margin-bottom: 34px;
}
.search-group {
  margin-bottom: 40px;
}
.search-group__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.search-group__head a {
  color: #1b2839;
  font-weight: 500;
}
.search-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #ececec;
  border-radius: 12px;
  color: #1b2839;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-item:hover {
  text-decoration: none;
  color: #1b2839;
  border-color: #ffc446;
  box-shadow: 0 8px 24px rgba(27, 40, 57, 0.08);
}
.search-item img {
  flex-shrink: 0;
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #f6f7f9;
}
.search-item small {
  display: block;
  color: #b07d0b;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.search-item strong {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 15px;
  line-height: 1.4;
}
.search-empty {
  padding: 24px;
  border-radius: 12px;
  background: #f6f7f9;
  color: #3d4a5c;
  max-width: 640px;
}
.search-empty p {
  margin: 0 0 6px;
  font-weight: 400;
}

/* Header spacing (measured: container 1140px, menu text ~503px). */
.hdr {
  gap: 28px;
}
.hdr__logo img {
  height: 52px;
}
.header .hdr__menu > ul {
  display: flex;
  gap: 40px;
}
.header .hdr__menu > ul > li,
.header .hdr__menu > ul > li:last-child {
  margin-right: 0;
}
.hdr__actions {
  gap: 10px;
}
.header .hdr__phone {
  padding: 10px 16px;
  font-size: 17px;
}
@media (max-width: 1199px) {
  .hdr {
    gap: 20px;
  }
  .hdr__logo img {
    height: 46px;
  }
  .header .hdr__menu > ul {
    gap: 26px;
  }
  /* Phone becomes an icon button so the menu keeps its spacing. */
  .header .hdr__phone {
    width: 44px;
    height: 44px;
    padding: 0 !important;
    justify-content: center;
    border-radius: 50%;
  }
  .hdr__phone-num {
    display: none;
  }
}
/* Wide screens: the theme widens the container to 1410px, so the menu can breathe more. */
@media (min-width: 1450px) {
  .header .hdr__menu > ul {
    gap: 56px;
  }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 950;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #1b2839;
  color: #ffc446;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(27, 40, 57, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, background 0.2s, color 0.2s;
}
.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  background: #ffc446;
  color: #1b2839;
}
.to-top i {
  position: relative;
  top: -1px;
}
@media (max-width: 767px) {
  .to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
  /* Product page on phones: sit above the call / quote bar. */
  body:has(.pd-mobilebar) .to-top {
    bottom: 84px;
  }
}

/* ---------- Website chat ---------- */
.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 960;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: #ffc446;
  color: #1b2839;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(27, 40, 57, 0.28);
  transition: bottom 0.3s ease, transform 0.2s, background 0.2s;
}
.chat-fab:hover {
  transform: scale(1.06);
}
.chat-fab.is-open {
  background: #1b2839;
  color: #fff;
}
/* When "back to top" is showing, the chat button sits above it. */
.to-top.show ~ .chat-fab {
  bottom: 84px;
}
.chat-fab__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #e5372b;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  box-shadow: 0 0 0 2px #fff;
}
.chat-box {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 970;
  width: 370px;
  height: min(560px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(27, 40, 57, 0.28);
  overflow: hidden;
  animation: chat-in 0.22s ease;
}
.to-top.show ~ .chat-box {
  bottom: 156px;
  height: min(560px, calc(100vh - 190px));
}
@keyframes chat-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}
.chat-box__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #1b2839;
  color: #fff;
}
.chat-box__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
}
.chat-box__avatar img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.chat-box__head > div {
  flex: 1;
  min-width: 0;
}
.chat-box__head strong {
  display: block;
  font-family: 'Lexend Deca', sans-serif;
  font-size: 16px;
}
.chat-box__head small {
  color: #cdd8e3;
  font-size: 12px;
}
.chat-box__head .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ad07a;
  margin-right: 4px;
}
.chat-box__head button {
  border: 0;
  background: transparent;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}
.chat-box__head button:hover {
  background: rgba(255, 255, 255, 0.12);
}
.chat-box__list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 8px;
  background: #f6f7f9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}
.chat-msg.visitor {
  align-self: flex-end;
  align-items: flex-end;
}
.chat-msg.staff,
.chat-msg.system {
  align-self: flex-start;
}
.chat-msg__name {
  font-size: 12px;
  color: #7a8596;
  margin: 0 0 3px 4px;
}
.chat-msg__bubble {
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.45;
  background: #fff;
  color: #1b2839;
  border: 1px solid #ececec;
  border-bottom-left-radius: 4px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.chat-msg.visitor .chat-msg__bubble {
  background: #1b2839;
  color: #fff;
  border-color: #1b2839;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 4px;
}
.chat-msg__bubble p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: 400;
}
.chat-msg__bubble a {
  color: inherit;
  text-decoration: underline;
}
.chat-msg__bubble img {
  display: block;
  max-width: 220px;
  max-height: 240px;
  border-radius: 10px;
  margin: 2px 0;
  object-fit: cover;
}
.chat-msg__bubble img + p {
  margin-top: 6px;
}
.chat-msg__time {
  font-size: 11px;
  color: #9aa3b0;
  margin: 3px 6px 0;
}
.chat-msg.pending .chat-msg__bubble {
  opacity: 0.6;
}
.chat-msg.failed .chat-msg__bubble {
  background: #fdecea;
  color: #c0392b;
  border-color: #f5c6c0;
}
.chat-box__note {
  text-align: center;
  font-size: 13px;
  color: #7a8596;
  margin: 6px 0;
}
.chat-contact {
  background: #fff;
  border: 1px solid #ffe2a3;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.chat-contact p {
  margin: 0;
  font-size: 13px;
  color: #3d4a5c;
  font-weight: 400;
  line-height: 1.45;
}
.chat-contact input {
  height: 38px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
}
.chat-contact div {
  display: flex;
  gap: 10px;
  align-items: center;
}
.chat-contact button {
  border: 0;
  border-radius: 8px;
  background: #ffc446;
  color: #1b2839;
  font-weight: 600;
  padding: 7px 16px;
  cursor: pointer;
}
.chat-contact button:disabled {
  opacity: 0.5;
}
.chat-contact button.link {
  background: transparent;
  color: #7a8596;
  font-weight: 400;
  padding: 0;
}
.chat-box__error {
  margin: 0;
  padding: 6px 14px;
  background: #fdecea;
  color: #c0392b;
  font-size: 13px;
}
.chat-box__compose {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid #ececec;
  background: #fff;
}
.chat-box__compose textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border: 1px solid #e1e1e1;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 14.5px;
  line-height: 1.4;
  color: #1b2839;
}
.chat-box__compose textarea:focus {
  outline: none;
  border-color: #ffc446;
}
.chat-box__compose button {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 17px;
}
.chat-box__compose .attach {
  background: transparent;
  color: #7a8596;
}
.chat-box__compose .attach:hover {
  background: #f6f7f9;
  color: #1b2839;
}
.chat-box__compose .send {
  background: #ffc446;
  color: #1b2839;
}
.chat-box__compose button:disabled {
  opacity: 0.45;
  cursor: default;
}
@media (max-width: 767px) {
  .chat-fab {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
  .to-top.show ~ .chat-fab {
    bottom: 70px;
  }
  body:has(.pd-mobilebar) .chat-fab {
    bottom: 84px;
  }
  body:has(.pd-mobilebar) .to-top.show ~ .chat-fab {
    bottom: 138px;
  }
  /* Full screen on phones. */
  .chat-box,
  .to-top.show ~ .chat-box {
    inset: 0;
    width: auto;
    height: auto;
    border-radius: 0;
    bottom: 0;
  }
  .chat-fab.is-open {
    display: none;
  }
  .chat-box__compose textarea {
    font-size: 16px; /* stops iOS zooming in */
  }
}
