@font-face {
  font-family: "Colfax";
  src:
    local("Colfax");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.asc-widget-root {
  --asc-primary: #0f766e;
  --asc-secondary: #ecfeff;
  --asc-font: "Poppins", "Segoe UI", sans-serif;
  --asc-heading-font: "Colfax", "Trebuchet MS", "Segoe UI", sans-serif;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  font-family: var(--asc-font);
}

.asc-widget-toggle {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--asc-primary), #155e75);
  color: #fff;
  padding: 14px 18px;
  box-shadow: 0 20px 40px rgba(15, 118, 110, 0.25);
  cursor: pointer;
}

.asc-widget-panel {
  width: min(360px, calc(100vw - 24px));
  height: 470px;
  margin-top: 12px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
}

.asc-widget-root.is-open .asc-widget-panel {
  display: flex;
}

.asc-widget-header {
  background: linear-gradient(145deg, var(--asc-primary), #164e63);
  color: #fff;
  padding: 12px 14px;
}

.asc-widget-header strong,
.asc-widget-toggle {
  font-family: var(--asc-heading-font);
  letter-spacing: -0.02em;
  font-size: 13px;
}

.asc-widget-subtitle {
  display: block;
  opacity: 0.8;
  margin-top: 4px;
  font-size: 11px;
  font-family: var(--asc-font);
}

.asc-widget-messages {
  flex: 1;
  padding: 10px;
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  overflow-y: auto;
}

.asc-message {
  display: flex;
  margin-bottom: 7px;
}

.asc-message-user {
  justify-content: flex-end;
}

.asc-bubble {
  max-width: 80%;
  border-radius: 18px;
  padding: 8px 10px;
  line-height: 1.28;
  font-size: 12px;
  font-family: var(--asc-font);
}

.asc-bubble-line + .asc-bubble-line {
  margin-top: 6px;
}

.asc-bubble-heading {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 12px;
  color: #0f172a;
}

.asc-bubble-list {
  margin: 0;
  padding-left: 18px;
}

.asc-bubble-list li + li {
  margin-top: 6px;
}

.asc-bubble-list-item {
  line-height: 1.35;
}

.asc-inline-label {
  font-weight: 700;
  color: #0f172a;
}

.asc-inline-link {
  color: #0b5ed7;
  text-decoration: underline;
  word-break: break-word;
}

.asc-inline-link:hover {
  color: #084298;
}

.asc-message-assistant .asc-bubble {
  background: var(--asc-secondary);
  color: #0f172a;
}

.asc-message-user .asc-bubble {
  background: var(--asc-primary);
  color: #fff;
}

.asc-widget-quick-replies {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 10px 8px;
  background: #fff;
}

.asc-chip {
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: #fff;
  color: #0f766e;
  border-radius: 999px;
  padding: 5px 9px;
  cursor: pointer;
  font-family: var(--asc-font);
  font-size: 10px;
  line-height: 1.2;
}

.asc-widget-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.asc-widget-input {
  resize: none;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  padding: 9px 11px;
  font-family: var(--asc-font);
  font-size: 12px;
}

.asc-widget-submit {
  border: 0;
  border-radius: 14px;
  background: var(--asc-primary);
  color: #fff;
  padding: 0 12px;
  font-family: var(--asc-heading-font);
  font-size: 12px;
}

.asc-typing {
  display: inline-flex;
  gap: 5px;
  padding: 10px 0 16px;
}

.asc-typing span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
  animation: asc-bounce 1.2s infinite ease-in-out;
}

.asc-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.asc-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes asc-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-5px); opacity: 1; }
}

@media (max-width: 640px) {
  .asc-widget-root {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .asc-widget-toggle {
    width: 100%;
  }

  .asc-widget-panel {
    width: 100%;
    height: min(62vh, 470px);
  }
}
