/* v8.5.80 - local DVLabs livechat foundation/polish
   Standalone widget styling. No cookies, no tracking, no external libraries. */
.dv-chat-root,
.dv-chat-root * {
  box-sizing: border-box;
}

.dv-chat-root {
  position: fixed;
  right: clamp(14px, 2.2vw, 24px);
  bottom: clamp(14px, 2.2vw, 24px);
  z-index: 90000;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: #0b1728;
}

.dv-chat-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(123, 182, 255, 0.38);
  border-radius: 999px;
  background: linear-gradient(180deg, #132a44 0%, #0b1728 100%);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(7, 19, 33, 0.22);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.dv-chat-toggle:hover,
.dv-chat-toggle:focus-visible {
  border-color: rgba(123, 182, 255, 0.64);
  box-shadow: 0 16px 36px rgba(7, 19, 33, 0.28), 0 0 18px rgba(120, 190, 255, 0.18);
  transform: translateY(-1px);
}

.dv-chat-toggle:focus-visible,
.dv-chat-close:focus-visible,
.dv-chat-submit:focus-visible,
.dv-chat-field input:focus-visible,
.dv-chat-field textarea:focus-visible,
.dv-chat-session:focus-visible,
.dv-chat-admin-reply textarea:focus-visible {
  outline: 2px solid rgba(120, 190, 255, 0.58);
  outline-offset: 3px;
}

.dv-chat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
}

.dv-chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  width: min(390px, calc(100vw - 28px));
  border: 1px solid rgba(123, 182, 255, 0.24);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(7, 19, 33, 0.24);
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease;
}

.dv-chat-root.is-open .dv-chat-panel {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
  visibility: visible;
}

.dv-chat-root.is-open .dv-chat-toggle {
  box-shadow: 0 12px 28px rgba(7, 19, 33, 0.18);
}

.dv-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 16px;
  background: linear-gradient(135deg, #10243a 0%, #071321 100%);
  color: #ffffff;
}

.dv-chat-title {
  display: grid;
  gap: 3px;
}

.dv-chat-title strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.dv-chat-title span {
  display: block;
  color: #bdd1e8;
  font-size: 13px;
  line-height: 1.3;
}

.dv-chat-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.dv-chat-close:hover {
  background: rgba(255, 255, 255, 0.11);
}

.dv-chat-body {
  padding: 18px;
}

.dv-chat-intro {
  margin: 0 0 16px;
  color: #51627a;
  font-size: 14px;
  line-height: 1.55;
}

.dv-chat-start-form,
.dv-chat-message-form {
  display: grid;
  gap: 12px;
}

.dv-chat-field {
  display: grid;
  gap: 7px;
}

.dv-chat-field span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #0b1728;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.dv-chat-field small {
  color: #7c8da1;
  font-size: 12px;
  font-weight: 650;
}

.dv-chat-field input,
.dv-chat-field textarea {
  width: 100%;
  border: 1px solid #cfd9e4;
  border-radius: 13px;
  background: #ffffff;
  color: #0b1728;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.dv-chat-field input {
  min-height: 46px;
  padding: 0 13px;
}

.dv-chat-field textarea {
  min-height: 86px;
  max-height: 170px;
  padding: 12px 13px;
  resize: vertical;
}

.dv-chat-message-field textarea {
  min-height: 62px;
}

.dv-chat-field input:focus,
.dv-chat-field textarea:focus {
  border-color: #1b65bd;
  box-shadow: 0 0 0 4px rgba(27, 101, 189, 0.12);
}

.dv-chat-field input::placeholder,
.dv-chat-field textarea::placeholder {
  color: #7c8da1;
  opacity: 1;
}

.dv-chat-field input.dv-chat-error,
.dv-chat-field textarea.dv-chat-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.10);
}

.dv-chat-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  margin-top: 2px;
  border: 1px solid rgba(123, 182, 255, 0.34);
  border-radius: 13px;
  background: #071321;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.dv-chat-submit:hover:not(:disabled) {
  background: #10243a;
  border-color: rgba(123, 182, 255, 0.56);
  box-shadow: 0 12px 24px rgba(7, 19, 33, 0.13);
  transform: translateY(-1px);
}

.dv-chat-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.dv-chat-status {
  min-height: 20px;
  margin: 0;
  color: #51627a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.dv-chat-status.is-error {
  color: #b91c1c;
}

.dv-chat-status.is-success {
  color: #166534;
}

.dv-chat-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #d4e0ec;
  border-radius: 14px;
  background: #f6faff;
}

.dv-chat-session-label {
  color: #166534;
  font-size: 12px;
  font-weight: 850;
}

.dv-chat-customer-badge {
  color: #0b1728;
  font-size: 12px;
  font-weight: 900;
}

.dv-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: 240px;
  margin: 0 0 12px;
  padding: 12px;
  overflow: auto;
  border: 1px solid #d4e0ec;
  border-radius: 16px;
  background: #f8fbff;
}

.dv-chat-empty {
  margin: auto;
  color: #6b7c91;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.dv-chat-bubble {
  max-width: 82%;
  display: grid;
  gap: 4px;
}

.dv-chat-bubble p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
}

.dv-chat-bubble time {
  color: #7c8da1;
  font-size: 11px;
  font-weight: 700;
}

.dv-chat-bubble-customer {
  align-self: flex-end;
  text-align: right;
}

.dv-chat-bubble-customer p {
  background: #071321;
  color: #ffffff;
  border-bottom-right-radius: 6px;
}

.dv-chat-bubble-admin {
  align-self: flex-start;
  text-align: left;
}

.dv-chat-bubble-admin p {
  background: #ffffff;
  color: #0b1728;
  border: 1px solid #d4e0ec;
  border-bottom-left-radius: 6px;
}

.dv-chat-bubble-system {
  align-self: center;
  max-width: 90%;
  text-align: center;
}

.dv-chat-bubble-system p {
  background: #eaf4ff;
  color: #405269;
  font-size: 12.5px;
  font-weight: 700;
}

.dv-chat-bubble-system time {
  display: none;
}

@media (max-width: 640px) {
  .dv-chat-root {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .dv-chat-toggle {
    margin-left: auto;
    min-height: 46px;
    padding: 0 15px;
    font-size: 13.5px;
  }

  .dv-chat-panel {
    right: 0;
    left: 0;
    width: auto;
    bottom: calc(100% + 12px);
    border-radius: 20px;
  }

  .dv-chat-body {
    padding: 16px;
  }

  .dv-chat-messages {
    height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dv-chat-toggle,
  .dv-chat-panel,
  .dv-chat-submit,
  .dv-chat-field input,
  .dv-chat-field textarea {
    transition: none !important;
  }

  .dv-chat-toggle:hover,
  .dv-chat-toggle:focus-visible,
  .dv-chat-submit:hover:not(:disabled) {
    transform: none;
  }
}


/* v8.5.77 - closed chat state */
.dv-chat-new-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  margin-top: 10px;
  border: 1px solid #bfd5ec;
  border-radius: 13px;
  background: #ffffff;
  color: #071321;
  font: inherit;
  font-size: 13.5px;
  font-weight: 850;
  cursor: pointer;
}

.dv-chat-new-chat:hover:not(:disabled) {
  background: #f3f8ff;
  border-color: rgba(27, 101, 189, 0.42);
}

.dv-chat-new-chat[hidden] {
  display: none !important;
}

.dv-chat-live-view:has(.dv-chat-new-chat:not([hidden])) .dv-chat-session-label {
  color: #b91c1c;
}

.dv-chat-field textarea:disabled,
.dv-chat-submit:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

/* v8.5.78 - availability status and offline fallback */
.dv-chat-availability {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 14px;
  padding: 0.85rem 0.95rem;
  border: 1px solid #d4e0ec;
  border-radius: 15px;
  background: #f6faff;
}

.dv-chat-availability-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dv-chat-availability-badge.is-online {
  background: #dcfce7;
  color: #166534;
}

.dv-chat-availability-badge.is-offline {
  background: #fee2e2;
  color: #991b1b;
}

.dv-chat-availability-message {
  color: #0b1728;
  font-size: 0.9rem;
  line-height: 1.35;
}

.dv-chat-availability-hours {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.dv-chat-contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  margin: 0 0 12px;
  border: 1px solid #bfd5ec;
  border-radius: 13px;
  background: #ffffff;
  color: #071321;
  font: inherit;
  font-size: 13.5px;
  font-weight: 850;
  text-decoration: none;
}

.dv-chat-contact-link:hover,
.dv-chat-contact-link:focus-visible {
  background: #f3f8ff;
  border-color: rgba(27, 101, 189, 0.42);
}

.dv-chat-contact-link[hidden],
.dv-chat-start-form[hidden] {
  display: none !important;
}

/* v8.5.80 - livechat customer text and UI polish */
.dv-chat-toggle {
  flex-wrap: wrap;
  row-gap: 2px;
  min-width: 132px;
}

.dv-chat-toggle-text {
  line-height: 1;
}

.dv-chat-toggle-status {
  flex-basis: 100%;
  margin-left: 34px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-align: left;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dv-chat-start-head {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.95rem;
}

.dv-chat-start-head h3 {
  margin: 0;
  color: #071321;
  font-size: 1.1rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.dv-chat-start-head p {
  margin: 0;
  color: #51627a;
  font-size: 0.88rem;
  line-height: 1.58;
}

.dv-chat-intro {
  padding: 0.75rem 0.85rem;
  border: 1px solid #dbe7f3;
  border-radius: 14px;
  background: #fbfdff;
  font-weight: 700;
}

.dv-chat-session-bar {
  background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
}

.dv-chat-session-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dv-chat-session-label::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.10);
}

.dv-chat-closed-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.dv-chat-contact-link-closed {
  margin: 0;
}

@media (max-width: 640px) {
  .dv-chat-toggle {
    min-width: 118px;
  }

  .dv-chat-toggle-status {
    margin-left: 30px;
    font-size: 0.64rem;
  }
}


/* v8.5.81 - livechat button scope polish
   Compact, calmer contact-page chat launcher. */
.dv-chat-toggle {
  display: inline-grid;
  grid-template-columns: 22px auto;
  grid-template-rows: auto auto;
  column-gap: 9px;
  row-gap: 2px;
  align-items: center;
  justify-content: start;
  min-width: 124px;
  min-height: 46px;
  padding: 8px 16px 8px 14px;
  border: 1px solid rgba(123, 182, 255, 0.34);
  border-radius: 18px;
  background: linear-gradient(180deg, #10243a 0%, #071321 100%);
  box-shadow: 0 12px 26px rgba(7, 19, 33, 0.18), inset 0 1px 0 rgba(255,255,255,0.04);
  transform: none;
}

.dv-chat-toggle:hover,
.dv-chat-toggle:focus-visible {
  border-color: rgba(123, 182, 255, 0.56);
  box-shadow: 0 14px 28px rgba(7, 19, 33, 0.22), 0 0 14px rgba(120, 190, 255, 0.12);
  transform: none;
}

.dv-chat-icon {
  grid-row: 1 / span 2;
  grid-column: 1;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.10);
  font-size: 12px;
}

.dv-chat-toggle-text {
  grid-column: 2;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.dv-chat-toggle-status {
  grid-column: 2;
  flex-basis: auto;
  margin: 0;
  color: rgba(219, 231, 246, 0.70);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

.dv-chat-root.is-open .dv-chat-toggle {
  box-shadow: 0 10px 22px rgba(7, 19, 33, 0.16);
}

@media (max-width: 640px) {
  .dv-chat-toggle {
    min-width: 112px;
    min-height: 44px;
    padding: 7px 13px 7px 12px;
    border-radius: 16px;
  }

  .dv-chat-icon {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .dv-chat-toggle-text {
    font-size: 13px;
  }

  .dv-chat-toggle-status {
    margin: 0;
    font-size: 10.5px;
  }
}


/* v8.5.82 - livechat button online/offline status fix */
.dv-chat-toggle-status:empty {
  display: none;
}

.dv-chat-toggle-status.is-online {
  color: #35d07f;
}

.dv-chat-toggle-status.is-offline {
  color: #f87171;
}

.dv-chat-root.dv-chat-status-online .dv-chat-toggle {
  border-color: rgba(53, 208, 127, 0.36);
}

.dv-chat-root.dv-chat-status-online .dv-chat-icon {
  box-shadow: 0 0 0 4px rgba(53, 208, 127, 0.10);
}

.dv-chat-root.dv-chat-status-offline .dv-chat-toggle {
  border-color: rgba(248, 113, 113, 0.34);
}

.dv-chat-root.dv-chat-status-offline .dv-chat-icon {
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.10);
}
