/**
 * Premium open-state panel for the floating contact widget.
 */

body .chatWidgetOverlay {
  background: rgba(7, 28, 41, 0.46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body .chatWidgetModal {
  display: flex;
  width: 372px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 130px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(25, 88, 113, 0.14);
  border-radius: 28px;
  background: #f4f8fa;
  color: #102b44;
  box-shadow:
    0 34px 90px rgba(4, 30, 45, 0.26),
    0 10px 26px rgba(4, 30, 45, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

body .chatWidgetModal.active {
  transform: translateY(0) scale(1);
}

body .chatWidgetHeader {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 122px;
  padding: 24px 64px 23px 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% -25%, rgba(105, 215, 207, 0.25), transparent 38%),
    linear-gradient(135deg, #0b4867 0%, #0f7180 57%, #15968c 100%);
}

body .chatWidgetHeader::before {
  top: -72px;
  right: -48px;
  width: 180px;
  height: 180px;
  border: 28px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  background: transparent;
}

body .chatWidgetHeader::after {
  right: 28%;
  bottom: -70px;
  left: auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
}

body .chatWidgetHeaderIcon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

body .chatWidgetHeaderIcon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
}

body .chatWidgetHeaderCopy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

body .chatWidgetHeaderEyebrow {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body .chatWidgetHeaderTitle {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: 1.18rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

body .chatWidgetHeaderSub {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 550;
  line-height: 1.4;
}

body .chatWidgetClose {
  top: 18px;
  right: 18px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

body .chatWidgetClose:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.17);
  transform: rotate(0) translateY(-1px);
}

body .chatWidgetClose:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

body .chatWidgetClose svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke-linecap: round;
}

body .chatWidgetBody {
  display: flex;
  gap: 10px;
  min-height: 0;
  padding: 16px;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 100%, rgba(37, 132, 179, 0.05), transparent 36%),
    #f4f8fa;
  scrollbar-color: #c6dbe4 transparent;
  scrollbar-width: thin;
}

body .chatWidgetAction {
  --chat-action-color: #168f8a;
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 36px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 11px 12px 11px 11px;
  overflow: hidden;
  border: 1px solid #dce8ee;
  border-radius: 18px;
  background: #ffffff;
  color: #102b44;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 9px 24px rgba(22, 68, 94, 0.055);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body .chatWidgetAction::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 3px;
  border-radius: 0 99px 99px 0;
  background: var(--chat-action-color);
  opacity: 0.85;
  content: "";
}

body .chatWidgetAction::after {
  display: none;
}

body .chatWidgetAction:hover {
  border-color: color-mix(in srgb, var(--chat-action-color) 34%, #dce8ee);
  background: #ffffff;
  color: #102b44;
  box-shadow: 0 15px 32px rgba(22, 68, 94, 0.11);
  transform: translateY(-3px);
}

body .chatWidgetAction:active {
  transform: translateY(-1px);
}

body .chatWidgetAction:focus-visible {
  outline: 2px solid var(--chat-action-color);
  outline-offset: 2px;
}

body .chatWidgetActionIcon {
  display: grid;
  width: 50px !important;
  height: 50px !important;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--chat-action-color) 17%, #ffffff);
  border-radius: 15px;
  background: color-mix(in srgb, var(--chat-action-color) 11%, #ffffff);
  color: var(--chat-action-color);
  box-shadow: none;
  transition: background 180ms ease, transform 180ms ease;
}

body .chatWidgetAction:hover .chatWidgetActionIcon {
  background: color-mix(in srgb, var(--chat-action-color) 16%, #ffffff);
  transform: scale(1.035);
}

body .chatWidgetActionIcon svg {
  width: 23px;
  height: 23px;
  color: var(--chat-action-color);
  fill: currentColor;
}

body .chatWidgetActionIcon svg[fill="none"] {
  fill: none;
  stroke: currentColor;
}

body .chatWidgetActionText {
  display: flex;
  min-width: 0;
  gap: 3px;
  flex-direction: column;
}

body .chatWidgetActionTitle {
  overflow: hidden;
  color: #153149;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .chatWidgetActionDesc {
  overflow: hidden;
  color: #718698;
  font-size: 0.65rem;
  font-weight: 550;
  line-height: 1.35;
  opacity: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .chatWidgetActionArrow {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #e0eaef;
  border-radius: 12px;
  background: #f6f9fa;
  color: #718899;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

body .chatWidgetActionArrow svg {
  width: 17px;
  height: 17px;
}

body .chatWidgetAction:hover .chatWidgetActionArrow {
  border-color: color-mix(in srgb, var(--chat-action-color) 22%, #e0eaef);
  background: color-mix(in srgb, var(--chat-action-color) 9%, #ffffff);
  color: var(--chat-action-color);
  transform: translateX(2px);
}

body .chatWidgetPanelNote {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 5px 5px 1px;
  color: #7c8f9d;
  font-size: 0.57rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

body .chatWidgetPanelNote > span {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #3ac79c;
  box-shadow: 0 0 0 4px rgba(58, 199, 156, 0.1);
}

@media (max-width: 768px) {
  body .chatWidgetModal {
    max-height: calc(100dvh - 174px);
    border-radius: 23px;
  }

  body .chatWidgetHeader {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
    min-height: 108px;
    padding: 20px 55px 19px 18px;
  }

  body .chatWidgetHeaderIcon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  body .chatWidgetHeaderIcon svg {
    width: 22px;
    height: 22px;
  }

  body .chatWidgetHeaderTitle {
    font-size: 1.02rem;
  }

  body .chatWidgetClose {
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
  }

  body .chatWidgetBody {
    padding: 13px;
  }

  body .chatWidgetAction {
    grid-template-columns: 46px minmax(0, 1fr) 34px;
    gap: 10px;
    min-height: 68px;
    padding: 9px 10px 9px 9px;
    border-radius: 16px;
  }

  body .chatWidgetActionIcon {
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px;
  }

  body .chatWidgetActionArrow {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  body .chatWidgetPanelNote {
    font-size: 0.54rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .chatWidgetModal,
  body .chatWidgetAction,
  body .chatWidgetAction *,
  body .chatWidgetClose {
    transition-duration: 0.01ms !important;
  }
}

body.a11y-bw .chatWidgetModal,
body.a11y-bw .chatWidgetHeader,
body.a11y-bw .chatWidgetBody,
body.a11y-bw .chatWidgetAction,
body.a11y-bw .chatWidgetActionIcon,
body.a11y-bw .chatWidgetActionArrow {
  border-color: #000 !important;
  background: #fff !important;
  color: #000 !important;
  box-shadow: none !important;
}

body.a11y-bw .chatWidgetHeader *,
body.a11y-bw .chatWidgetAction *,
body.a11y-bw .chatWidgetPanelNote {
  color: #000 !important;
}
