.aislc-widget,
.aislc-widget * {
  box-sizing: border-box;
}

.aislc-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  font-family: inherit;
}

.aislc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--aislc-primary, #CAB09F);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
}

.aislc-toggle:hover,
.aislc-toggle:active,
.aislc-open .aislc-toggle {
  background: var(--aislc-hover, #73695F);
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.aislc-toggle-icon {
  font-size: 20px;
  line-height: 1;
}

.aislc-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 360px;
  max-width: calc(100vw - 28px);
  height: 540px;
  max-height: calc(100vh - 115px);
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0,0,0,0.08);
}

.aislc-open .aislc-panel {
  display: flex;
}

.aislc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px;
  background: var(--aislc-secondary, #73695F);
  color: #ffffff;
}

.aislc-title {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.aislc-subtitle {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  opacity: .84;
}

.aislc-close {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  transition: background-color .2s ease, transform .2s ease;
}

.aislc-close:hover,
.aislc-close:active {
  background: rgba(255,255,255,.34);
  transform: scale(1.04);
}

.aislc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: #f7f8f9;
}

.aislc-message {
  margin-bottom: 14px;
}

.aislc-message-label {
  display: block;
  margin: 0 0 5px;
  color: #68747b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.aislc-message-bubble {
  max-width: 88%;
  display: inline-block;
  padding: 11px 13px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.45;
  color: #263238;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(0,0,0,.06);
}

.aislc-message-visitor {
  text-align: right;
}

.aislc-message-visitor .aislc-message-bubble {
  background: var(--aislc-primary, #CAB09F);
  color: #ffffff;
  border-bottom-right-radius: 6px;
}

.aislc-message-bot .aislc-message-bubble {
  border-bottom-left-radius: 6px;
}

.aislc-details-form,
.aislc-chat-form {
  padding: 14px;
  border-top: 1px solid rgba(0,0,0,.08);
  background: #ffffff;
}

.aislc-form-intro {
  margin: 0 0 10px;
  color: #68747b;
  font-size: 13px;
  line-height: 1.45;
}

.aislc-details-form input,
.aislc-chat-form input {
  width: 100%;
  min-height: 44px;
  margin: 0 0 10px;
  padding: 10px 13px;
  border: 1px solid #dde5e8;
  border-radius: 13px;
  background: #fbfcfd;
  color: #263238;
  font-size: 14px;
  outline: none;
  box-shadow: none;
}

.aislc-details-form input:focus,
.aislc-chat-form input:focus {
  border-color: var(--aislc-primary, #CAB09F);
  box-shadow: 0 0 0 4px rgba(202,176,159,.18);
}

.aislc-details-form button,
.aislc-chat-form button {
  border: 0;
  border-radius: 999px;
  background: var(--aislc-primary, #CAB09F);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.aislc-details-form button:hover,
.aislc-details-form button:active,
.aislc-chat-form button:hover,
.aislc-chat-form button:active {
  background: var(--aislc-hover, #73695F);
  transform: translateY(-1px);
}

.aislc-details-form button:disabled,
.aislc-chat-form button:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.aislc-details-form button {
  width: 100%;
  min-height: 44px;
}

.aislc-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aislc-chat-form input {
  margin: 0;
  flex: 1;
}

.aislc-chat-form button {
  min-width: 74px;
  min-height: 44px;
  padding: 0 16px;
}

.aislc-error {
  margin-top: 8px;
  color: #d63638;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .aislc-widget {
    right: 14px;
    bottom: 14px;
  }

  .aislc-panel {
    width: calc(100vw - 28px);
    height: calc(100vh - 105px);
    bottom: 68px;
  }

  .aislc-toggle-text {
    display: none;
  }

  .aislc-toggle {
    width: 56px;
    min-width: 56px;
    padding: 0;
    justify-content: center;
  }
}
