/* 1 WORLD AUTOMOTIVE — CUSTOMER CHAT */

#worldChat,
#worldChat * {
  box-sizing: border-box;
}

#worldChat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  font-family: Arial, sans-serif;
  color: #14283a;
}

#worldChat button,
#worldChat input,
#worldChat textarea {
  font: inherit;
}

#worldChat button,
#worldChat a {
  -webkit-tap-highlight-color: transparent;
}

#worldChat .chat-launcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 52px;
  margin: 0;
  padding: 14px 22px;

  border: 0;
  border-radius: 30px;

  background: #087fae;
  color: #ffffff;

  font-size: 15px;
  font-weight: 700;
  cursor: pointer;

  box-shadow: 0 8px 26px rgba(7, 24, 43, 0.22);
}

#worldChat .chat-panel {
  display: flex;
  flex-direction: column;

  width: min(370px, calc(100vw - 40px));
  max-height: calc(100dvh - 110px);
  margin-bottom: 12px;

  overflow: hidden;

  border: 1px solid #cbdde8;
  border-radius: 18px;
  background: #ffffff;

  box-shadow: 0 16px 50px rgba(7, 24, 43, 0.22);
}

#worldChat .chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 16px;
  background: #102333;
  color: #ffffff;
}

#worldChat .chat-title {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

#worldChat .chat-subtitle {
  margin: 6px 0 0;
  color: #cfdeea;
  font-size: 12px;
  line-height: 1.5;
}

#worldChat .chat-close {
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 44px;
  width: 44px;
  height: 44px;

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ffffff;

  font-size: 26px;
  cursor: pointer;
}

#worldChat .chat-close:hover {
  background: #243e52;
}

#worldChat .chat-body {
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#worldChat .chat-intro {
  margin: 0 0 16px;
  color: #435e72;
  font-size: 14px;
  line-height: 1.6;
}

#worldChat .chat-label {
  display: block;
  margin: 14px 0 8px;
  color: #19334b;
  font-size: 13px;
  font-weight: 700;
}

#worldChat .chat-input,
#worldChat .chat-textarea {
  display: block;
  width: 100%;
  min-height: 44px;

  padding: 11px 12px;

  border: 1px solid #a9bdcd;
  border-radius: 9px;
  background: #ffffff;
  color: #14283a;

  font-size: 16px;
}

#worldChat .chat-textarea {
  min-height: 84px;
  resize: vertical;
}

#worldChat .chat-history {
  display: grid;
  align-content: start;
  gap: 12px;
  margin-bottom: 16px;
}

#worldChat .chat-message {
  max-width: 92%;
  padding: 12px;
  border-radius: 12px;
  background: #edf3f7;
  color: #14283a;
}

#worldChat .chat-message.from-visitor {
  justify-self: end;
  background: #e0f3fc;
}

#worldChat .chat-message strong {
  font-size: 12px;
}

#worldChat .chat-message p {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#worldChat .chat-message time {
  color: #526779;
  font-size: 11px;
}

#worldChat .chat-send {
  width: 100%;
  min-height: 46px;

  margin: 12px 0 0;
  padding: 12px 16px;

  border: 0;
  border-radius: 9px;
  background: #087fae;
  color: #ffffff;

  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#worldChat .chat-send:hover:not(:disabled),
#worldChat .chat-launcher:hover {
  background: #06658c;
}

#worldChat .chat-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#worldChat .chat-status,
#worldChat .chat-note {
  margin: 12px 0 0;
  color: #526779;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#worldChat .chat-error {
  color: #a61c28;
}

#worldChat .chat-footer {
  padding: 12px 16px;
  border-top: 1px solid #e1eaf0;
  background: #f7fafc;
}

#worldChat .chat-text-link {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;
  color: #087fae;

  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

#worldChat .chat-text-link:hover {
  text-decoration: underline;
}

#worldChat :focus-visible {
  outline: 3px solid #087fae;
  outline-offset: 3px;
}

#worldChat .chat-header :focus-visible {
  outline-color: #ffffff;
}

#worldChat [hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  #worldChat {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  #worldChat .chat-panel {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 100px - env(safe-area-inset-bottom));
  }
}