/* Host Cloud Live Chat — visitor widget (compact wide chip) */

/* Hello Elementor reset styles all buttons red (#c36) and loads after this file. */
.hclc button,
.hclc-launcher-wrap button {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  font: inherit;
  margin: 0;
  padding: 0;
  text-transform: none;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hclc-launcher-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999980;
  font-family: Outfit, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hclc-launcher-wrap.hclc-is-open .hclc-greeting {
  display: none;
}

.hclc-greeting {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 40px));
  min-height: 52px;
  padding: 0 14px 0 16px;
  background: #fff;
  border-radius: 999px;
  border: 1.5px solid rgba(15, 42, 95, 0.24);
  box-shadow: 0 8px 28px rgba(15, 42, 95, 0.16), 0 1px 3px rgba(15, 42, 95, 0.08);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: hclc-greeting-in 0.35s ease;
}

.hclc-greeting:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 42, 95, 0.18);
}

@keyframes hclc-greeting-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hclc-greeting-icon {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f2a5f 0%, #0e7490 100%);
  color: #fff;
}

.hclc-online-dot {
  display: none;
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  background: #0e7490;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(14, 116, 144, 0.35);
  animation: hclc-online-pulse 2s ease-in-out infinite;
}

.hclc-launcher-wrap.hclc-agent-online .hclc-online-dot {
  display: block;
}

@keyframes hclc-online-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(14, 116, 144, 0.35), 0 0 0 0 rgba(14, 116, 144, 0.35); }
  50% { box-shadow: 0 0 0 1px rgba(14, 116, 144, 0.35), 0 0 0 5px rgba(14, 116, 144, 0); }
}

.hclc-greeting-label {
  flex: 1;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f2a5f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hclc-greeting-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #94a3b8;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.hclc-greeting-close:hover {
  background: #f1f5f9;
  color: #475569;
}

.hclc-badge {
  position: absolute;
  top: -5px;
  right: 8px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  z-index: 2;
  border: 2px solid #fff;
}

.hclc[hidden] {
  display: none !important;
}

.hclc {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999990;
  width: min(380px, calc(100vw - 32px));
  font-family: Outfit, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hclc-panel {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 42, 95, 0.28), 0 0 0 1px rgba(15, 42, 95, 0.06);
  border: none;
  display: flex;
  flex-direction: column;
  max-height: min(520px, calc(100vh - 120px));
}

.hclc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0f2a5f 0%, #0e7490 100%);
  color: #fff;
}

.hclc-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.hclc-header-text {
  flex: 1;
  min-width: 0;
}

.hclc-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hclc-header-menu {
  position: relative;
}

.hclc-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 42, 95, 0.2);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  z-index: 5;
}

.hclc-menu-dropdown[hidden] {
  display: none !important;
}

.hclc .hclc-menu-item {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  padding: 12px 14px;
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: #0f2a5f;
}

.hclc-menu-item:hover {
  background: #f8fafc;
}

.hclc-menu-item-danger {
  color: #b42318;
}

.hclc-menu-item-danger:hover {
  background: #fef2f2;
}

.hclc-header-text strong {
  display: block;
  font-size: 1rem;
}

.hclc-header-status {
  display: block;
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 2px;
}

.hclc .hclc-header-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: background-color 0.15s ease;
}

.hclc .hclc-header-btn:hover,
.hclc .hclc-header-btn:focus {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  outline: none;
  box-shadow: none;
}

.hclc-intake {
  padding: 16px;
  overflow: auto;
}

.hclc-intake-lead {
  margin: 0 0 14px;
  color: #5b6b7c;
  font-size: 0.9rem;
  line-height: 1.45;
}

.hclc-form {
  display: grid;
  gap: 10px;
}

.hclc-field {
  display: grid;
  gap: 5px;
}

.hclc-field span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b6b7c;
}

.hclc-field input,
.hclc-field select {
  min-height: 40px;
  border: 1px solid #d6e4ea;
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  color: #0b1220;
  background: #fff;
}

.hclc-field input:focus,
.hclc-field select:focus {
  outline: none;
  border-color: #0e7490;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
}

.hclc-error {
  margin: 0;
  color: #b42318;
  font-size: 0.85rem;
  font-weight: 600;
}

.hclc .hclc-btn {
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.hclc .hclc-btn-primary {
  min-height: 44px;
  background: #0f2a5f;
  color: #fff;
  margin-top: 4px;
  padding: 0 1.25rem;
}

.hclc .hclc-btn-primary:hover,
.hclc .hclc-btn-primary:focus {
  background: #0a1f48;
  color: #fff;
  outline: none;
  box-shadow: none;
}

.hclc-chat {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  max-height: 420px;
}

.hclc-messages {
  flex: 1;
  overflow: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f4f7fa;
}

.hclc-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.hclc-msg-visitor {
  align-self: flex-end;
  background: #0f2a5f;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.hclc-msg-agent {
  align-self: flex-start;
  background: #fff;
  color: #0b1220;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}

.hclc-msg-sender {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0e7490;
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.hclc-msg-system {
  align-self: center;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  text-align: center;
  max-width: 100%;
  padding: 4px 8px;
}

.hclc-msg-time {
  display: block;
  font-size: 0.68rem;
  opacity: 0.65;
  margin-top: 4px;
}

.hclc-msg-text {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

.hclc-msg-attachment {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #0f2a5f;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.hclc-msg-attachment-image {
  display: block;
  padding: 0;
  background: transparent;
}

.hclc-msg-attachment-image img {
  display: block;
  max-width: min(220px, 100%);
  max-height: 180px;
  border-radius: 10px;
  border: 1px solid rgba(15, 42, 95, 0.12);
}

.hclc-compose {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  align-items: flex-end;
}

.hclc-compose-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.hclc-attach-preview {
  width: 100%;
  max-width: 100%;
}

.hclc-attach-preview[hidden] {
  display: none !important;
}

.hclc-attach-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.hclc-attach-preview-item {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.hclc-attach-preview-item img {
  display: block;
  width: auto;
  max-width: 100px;
  max-height: 72px;
  border-radius: 10px;
  border: 1px solid #d6e4ea;
  object-fit: cover;
}

.hclc-attach-preview-file {
  display: inline-block;
  max-width: 100px;
  padding: 8px 28px 8px 10px;
  border-radius: 10px;
  border: 1px solid #d6e4ea;
  background: #f3f8fb;
  font-size: 0.75rem;
  line-height: 1.3;
  color: #0f2a5f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hclc-attach-preview-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #0f2a5f;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(15, 42, 95, 0.25);
}

.hclc-attach-preview-remove:hover {
  background: #b42318;
}

.hclc-attach {
  width: 40px;
  height: 40px;
  border: 1px solid #d6e4ea;
  border-radius: 50%;
  background: #fff;
  color: #0f2a5f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hclc-attach:hover,
.hclc-attach:focus {
  background: #f3f8fb;
  outline: none;
}

.hclc-compose-main input {
  width: 100%;
}

.hclc-compose input {
  flex: 1;
  border: 1px solid #d6e4ea;
  border-radius: 999px;
  padding: 0 14px;
  min-height: 40px;
  font: inherit;
}

.hclc-compose input:focus {
  outline: none;
  border-color: #0e7490;
}

.hclc .hclc-send {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #0f2a5f;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hclc .hclc-send:hover,
.hclc .hclc-send:focus {
  background: #0a1f48;
  color: #fff;
  outline: none;
  box-shadow: none;
}

.hclc .hclc-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hclc-waiting {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.88rem;
}

.hclc-waiting[hidden] {
  display: none !important;
}

.hclc-waiting p {
  margin: 0;
}

.hclc-waiting-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
  animation: hclc-pulse 1.4s ease-in-out infinite;
}

@keyframes hclc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.92); }
}

.hclc-confirm {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.hclc-confirm[hidden] {
  display: none !important;
}

.hclc-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 30, 0.58);
  backdrop-filter: blur(5px);
  border-radius: 18px;
}

.hclc-confirm-card {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 22px 20px 18px;
  box-shadow: 0 22px 48px rgba(15, 42, 95, 0.28);
  border: 1px solid #d6e4ea;
  text-align: center;
  animation: hclc-confirm-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes hclc-confirm-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hclc-confirm-text {
  margin: 0 0 18px;
  color: #0f2a5f;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
}

.hclc-confirm-actions {
  display: flex;
  gap: 10px;
}

.hclc .hclc-confirm-btn {
  flex: 1;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
}

.hclc-confirm-no {
  background: #fff;
  border-color: #d6e4ea !important;
  color: #0f2a5f !important;
}

.hclc-confirm-no:hover {
  background: #f3f8fb;
}

.hclc-confirm-yes {
  background: linear-gradient(120deg, #0f2a5f 0%, #0e7490 100%) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(14, 116, 144, 0.28);
}

.hclc-confirm-yes:hover {
  filter: brightness(1.05);
}

@media (max-width: 480px) {
  .hclc-launcher-wrap {
    right: 12px;
    bottom: 12px;
  }

  .hclc-greeting {
    min-width: 0;
    width: calc(100vw - 24px);
  }

  .hclc-greeting-label {
    white-space: normal;
    font-size: 0.92rem;
  }

  .hclc {
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 100vh;
  }

  .hclc-panel {
    border-radius: 16px 16px 0 0;
    max-height: calc(100vh - 72px);
  }
}
