#wpcss-widget-root {
  position: fixed;
  bottom: 24px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#wpcss-widget-root.wpcss-position-right {
  right: 24px;
}

#wpcss-widget-root.wpcss-position-left {
  left: 24px;
}

.wpcss-app,
.wpcss-app * {
  box-sizing: border-box;
}

.wpcss-launcher,
.wpcss-submit,
.wpcss-secondary,
.wpcss-icon-button,
.wpcss-upload-clear {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.wpcss-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 124px;
  min-height: 46px;
  border-radius: 8px;
  background: var(--wpcss-primary, #2563eb);
  color: #fff;
  padding: 0 16px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  font-weight: 700;
  touch-action: manipulation;
}

.wpcss-launcher-icon,
.wpcss-launcher-text,
.wpcss-launcher-status {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.wpcss-launcher:focus-visible,
.wpcss-submit:focus-visible,
.wpcss-secondary:focus-visible,
.wpcss-icon-button:focus-visible,
.wpcss-upload-clear:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: 3px;
}

.wpcss-launcher-icon {
  justify-content: center;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22);
}

.wpcss-launcher-status {
  display: none;
}

.wpcss-launcher.is-offline .wpcss-launcher-icon {
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.22);
}

.wpcss-launcher-style-bubble .wpcss-launcher {
  position: relative;
  width: 60px;
  min-width: 60px;
  height: 60px;
  min-height: 60px;
  overflow: visible;
  border-radius: 999px;
  padding: 0;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

.wpcss-launcher-style-bubble .wpcss-launcher-icon {
  position: relative;
  width: 27px;
  height: 19px;
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}

.wpcss-launcher-style-bubble .wpcss-launcher-icon::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: -3px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #fff;
  transform: rotate(45deg);
}

.wpcss-launcher-style-bubble .wpcss-launcher-text,
.wpcss-launcher-style-bubble .wpcss-launcher-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.wpcss-launcher-style-bubble .wpcss-launcher.is-offline {
  background: #64748b;
  box-shadow: 0 16px 36px rgba(100, 116, 139, 0.26);
}

.wpcss-launcher-style-bubble .wpcss-launcher.is-offline .wpcss-launcher-icon {
  background: #fff;
  box-shadow: none;
}

.wpcss-launcher-style-glass .wpcss-launcher {
  display: grid;
  grid-template-columns: 34px minmax(0, auto);
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 1px;
  min-width: 166px;
  min-height: 58px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: #0f172a;
  padding: 8px 12px 8px 10px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(14px);
}

.wpcss-launcher-style-glass .wpcss-launcher-icon {
  grid-row: 1 / 3;
  align-self: center;
  justify-self: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--wpcss-primary, #2563eb);
  box-shadow: inset 0 -10px 16px rgba(15, 23, 42, 0.14);
}

.wpcss-launcher-style-glass .wpcss-launcher-icon::before,
.wpcss-launcher-style-outline .wpcss-launcher-icon::before {
  content: "";
  display: block;
  width: 16px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.wpcss-launcher-style-glass .wpcss-launcher-icon::before {
  border-color: #fff;
}

.wpcss-launcher-style-glass .wpcss-launcher-text {
  align-self: end;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
}

.wpcss-launcher-style-glass .wpcss-launcher-status {
  display: inline-flex;
  align-self: start;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
}

.wpcss-launcher-style-glass .wpcss-launcher.is-offline .wpcss-launcher-icon {
  background: #94a3b8;
}

.wpcss-launcher-style-outline .wpcss-launcher {
  min-height: 48px;
  border: 1.5px solid rgba(37, 99, 235, 0.42);
  border-radius: 999px;
  background: #fff;
  color: var(--wpcss-primary, #2563eb);
  padding: 0 15px 0 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.11);
}

.wpcss-launcher-style-outline .wpcss-launcher-icon {
  justify-content: center;
  width: 31px;
  height: 31px;
  border: 1.5px solid currentColor;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.wpcss-launcher-style-outline .wpcss-launcher-icon::before {
  color: currentColor;
}

.wpcss-launcher-style-outline .wpcss-launcher.is-offline .wpcss-launcher-icon {
  background: transparent;
  box-shadow: none;
}

.wpcss-launcher-style-pill .wpcss-launcher {
  letter-spacing: 0;
}

.wpcss-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  position: relative;
  width: min(404px, calc(100vw - 32px));
  height: min(700px, calc(100vh - 40px));
  height: min(700px, calc(100dvh - 40px));
  overflow: hidden;
  border: 1px solid #b9c6d6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}

.wpcss-app-inline .wpcss-panel {
  width: 100%;
  height: auto;
  min-height: 520px;
  max-height: none;
  margin: 0;
  box-shadow: none;
}

.wpcss-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(20, 184, 166, 0.35);
  background: #111827;
  color: #fff;
  line-height: 1.2;
  isolation: isolate;
}

.wpcss-panel-header > div {
  display: grid;
  gap: 1px;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.wpcss-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.wpcss-panel-header strong,
.wpcss-panel-header span {
  display: block;
  min-height: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  padding: 0;
}

.wpcss-panel-header strong {
  font-size: 14px;
  line-height: 1.12;
  margin-top: 0;
}

.wpcss-panel-header span {
  margin-top: 1px;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.2;
}

.wpcss-agent-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 0;
  margin: 0;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.16);
  color: #99f6e4;
  font-size: 10px;
  font-style: normal;
  line-height: 1;
  padding: 3px 6px;
}

.wpcss-agent-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.wpcss-agent-offline .wpcss-agent-pill {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

.wpcss-agent-offline .wpcss-agent-pill::before {
  background: #94a3b8;
}

.wpcss-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.wpcss-icon-button:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.wpcss-panel-body {
  min-height: 0;
  max-height: none;
  overflow: auto;
  background: #eef4f8;
}

.wpcss-start,
.wpcss-thread-view {
  padding: 12px;
}

.wpcss-start {
  min-height: 100%;
}

.wpcss-thread-view {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.wpcss-welcome,
.wpcss-muted {
  margin: 0 0 14px;
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
}

.wpcss-form,
.wpcss-reply-form {
  display: grid;
  gap: 10px;
}

.wpcss-field {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}

.wpcss-field input,
.wpcss-field textarea,
.wpcss-reply-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d4dce7;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  padding: 9px 11px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.wpcss-field input:focus,
.wpcss-field textarea:focus,
.wpcss-reply-form textarea:focus {
  border-color: var(--wpcss-primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: 0;
}

.wpcss-field textarea,
.wpcss-reply-form textarea {
  resize: vertical;
  line-height: 1.5;
}

.wpcss-submit {
  min-height: 40px;
  border-radius: 8px;
  background: var(--wpcss-primary, #2563eb);
  color: #fff;
  font-weight: 700;
  padding: 0 16px;
}

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

.wpcss-secondary {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-weight: 650;
  padding: 0 14px;
}

.wpcss-error {
  min-height: 18px;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.4;
}

.wpcss-upload-box {
  display: grid;
  gap: 8px;
}

.wpcss-upload-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.wpcss-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wpcss-upload-button,
.wpcss-upload-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  padding: 0 10px;
}

.wpcss-upload-button {
  cursor: pointer;
}

.wpcss-upload-clear:disabled {
  cursor: default;
  opacity: 0.48;
}

.wpcss-upload-hint {
  margin-left: auto;
  color: #64748b;
  font-size: 12px;
}

.wpcss-upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.wpcss-upload-thumb {
  display: inline-flex;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
}

.wpcss-upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wpcss-notice {
  margin: 0 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  line-height: 1.45;
  padding: 9px 10px;
}

.wpcss-history-switcher {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}

.wpcss-history-switcher select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  padding: 0 10px;
}

.wpcss-status-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  border: 1px solid #dde6f1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  padding: 9px 10px;
}

.wpcss-status-summary strong {
  flex: 0 0 auto;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  padding: 5px 8px;
}

.wpcss-status-summary span {
  min-width: 0;
  overflow: hidden;
  color: #475569;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wpcss-status-summary.wpcss-status-open strong {
  background: #fff7ed;
  color: #c2410c;
}

.wpcss-status-summary.wpcss-status-pending strong {
  background: #eff6ff;
  color: #1d4ed8;
}

.wpcss-status-summary.wpcss-status-resolved strong {
  background: #f0fdf4;
  color: #15803d;
}

.wpcss-status-summary.wpcss-status-closed strong {
  background: #f1f5f9;
  color: #475569;
}

.wpcss-service-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 7px 9px;
}

.wpcss-service-summary strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.2;
}

.wpcss-service-summary span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.wpcss-service-after_sales {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.wpcss-service-pre_sales {
  border-color: #fed7aa;
  background: #fff7ed;
}

.wpcss-presets {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.wpcss-presets-title {
  color: #475569;
  font-size: 12px;
  line-height: 1.2;
}

.wpcss-preset-item {
  display: grid;
  gap: 7px;
}

.wpcss-preset-question,
.wpcss-preset-use {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.wpcss-preset-question {
  position: relative;
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  padding: 8px 28px 8px 10px;
  text-align: left;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.wpcss-preset-question::after {
  content: ">";
  position: absolute;
  right: 10px;
  top: 50%;
  color: #14b8a6;
  transform: translateY(-50%);
}

.wpcss-preset-question:hover {
  border-color: #14b8a6;
  background: #f8fffd;
}

.wpcss-preset-answer {
  display: grid;
  gap: 8px;
  border: 1px solid #dbe3ee;
  border-left: 3px solid #14b8a6;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
  padding: 9px 10px 9px 12px;
}

.wpcss-preset-answer p {
  margin: 0;
}

.wpcss-preset-use {
  justify-self: start;
  min-height: 30px;
  border-radius: 8px;
  background: var(--wpcss-primary, #2563eb);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
}

.wpcss-messages {
  display: grid;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 140px;
  max-height: none;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.wpcss-message {
  display: grid;
  gap: 4px;
}

.wpcss-message-user,
.wpcss-message-guest {
  justify-items: end;
}

.wpcss-message-agent,
.wpcss-message-system {
  justify-items: start;
}

.wpcss-message-meta {
  color: #64748b;
  font-size: 10px;
}

.wpcss-message-bubble {
  max-width: 88%;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 10px 12px;
  white-space: pre-wrap;
  line-height: 1.5;
  border: 1px solid #e6edf5;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.wpcss-message-bubble .wpcss-message-images {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
  white-space: normal;
}

.wpcss-message-bubble .wpcss-message-images:first-child {
  margin-top: 0;
}

.wpcss-message-bubble .wpcss-message-images a {
  display: block;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
}

.wpcss-message-bubble.has-images {
  max-width: 92%;
}

.wpcss-message-bubble.is-image-only {
  padding: 4px;
}

.wpcss-message-bubble .wpcss-message-images img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wpcss-message-user .wpcss-message-bubble,
.wpcss-message-guest .wpcss-message-bubble {
  border-color: transparent;
  background: var(--wpcss-primary, #2563eb);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.wpcss-message-user .wpcss-message-bubble.is-image-only,
.wpcss-message-guest .wpcss-message-bubble.is-image-only {
  background: #fff;
  border: 1px solid #dbe3ee;
}

.wpcss-message-system .wpcss-message-bubble {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #065f46;
}

.wpcss-reply-form {
  flex: 0 0 auto;
  margin-top: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 10px;
}

.wpcss-reply-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.wpcss-reply-row .wpcss-submit {
  min-width: 92px;
}

.wpcss-inline-support {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wpcss-inline-disabled {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f8fafc;
  color: #475569;
}

.wpcss-image-drawer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.2);
}

.wpcss-image-drawer-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(92%, 340px);
  height: 100%;
  background: #fff;
  box-shadow: -14px 0 34px rgba(15, 23, 42, 0.2);
}

.wpcss-image-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.wpcss-image-drawer-head strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wpcss-image-drawer-panel > img {
  align-self: center;
  justify-self: center;
  max-width: 100%;
  max-height: 100%;
  padding: 10px;
  object-fit: contain;
}


@media (max-width: 520px) {
  #wpcss-widget-root {
    right: 14px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: auto;
  }

  #wpcss-widget-root.wpcss-is-closed {
    bottom: calc(var(--wpcss-mobile-bottom-offset, 84px) + env(safe-area-inset-bottom, 0px));
  }

  #wpcss-widget-root.wpcss-position-left {
    right: auto;
    left: 14px;
  }

  #wpcss-widget-root.wpcss-position-right {
    right: 14px;
    left: auto;
  }

  .wpcss-panel {
    width: min(404px, calc(100vw - 24px));
    height: min(680px, calc(100vh - 24px));
    height: min(680px, calc(100dvh - 24px));
  }

  .wpcss-launcher {
    width: auto;
    min-width: 108px;
    max-width: calc(100vw - 28px);
    min-height: 42px;
    padding: 0 14px;
    border-radius: 8px;
  }
}
