:root {
  --deardocs-ha-primary: #395DFC;
  --deardocs-ha-bg: rgba(255, 255, 255, 0.85);
  --deardocs-ha-text: #333;
  --deardocs-ha-text-muted: #666;
  --deardocs-ha-border: rgba(229, 231, 235, 0.5);
  --deardocs-ha-shadow: 0px 0px 64px -10px rgba(0, 0, 0, 0.1);
}

.deardocs-help-assistant {
  position: fixed;
  z-index: 999999;
  bottom: 30px;
  font-family: inherit;
  /* Launcher Button */
  /* Modal */
}
.deardocs-help-assistant.position-bottom-right {
  right: 30px;
}
.deardocs-help-assistant.position-bottom-left {
  left: 30px;
}
.deardocs-help-assistant .deardocs-ha-launcher {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--deardocs-ha-primary);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: var(--deardocs-ha-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s;
  outline: none;
  padding: 0;
}
.deardocs-help-assistant .deardocs-ha-launcher:hover {
  transform: scale(1.1);
  background: #4d6eff;
}
.deardocs-help-assistant .deardocs-ha-launcher svg {
  width: 28px;
  height: 28px;
  transition: opacity 0.2s;
}
.deardocs-help-assistant .deardocs-ha-icon-close {
  position: absolute;
  opacity: 0;
}
.deardocs-help-assistant.is-active .deardocs-ha-icon-open {
  opacity: 0;
}
.deardocs-help-assistant.is-active .deardocs-ha-icon-close {
  opacity: 1;
}
.deardocs-help-assistant.is-active .deardocs-ha-modal {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.deardocs-help-assistant .deardocs-ha-modal {
  position: absolute;
  bottom: 80px;
  width: 380px;
  max-width: calc(100vw - 40px);
  max-height: 600px;
  height: 80vh;
  background: var(--deardocs-ha-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--deardocs-ha-border);
  border-radius: 20px;
  box-shadow: var(--deardocs-ha-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom right;
  box-sizing: border-box;
}
.deardocs-help-assistant .deardocs-ha-modal-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.deardocs-help-assistant.position-bottom-right .deardocs-ha-modal {
  right: 0;
  transform-origin: bottom right;
}
.deardocs-help-assistant.position-bottom-left .deardocs-ha-modal {
  left: 0;
  transform-origin: bottom left;
}
.deardocs-help-assistant .deardocs-ha-header {
  padding: 20px 24px;
  background: white;
  border-bottom: 1px solid var(--deardocs-ha-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.deardocs-help-assistant .deardocs-ha-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--deardocs-ha-text);
}
.deardocs-help-assistant .deardocs-ha-close {
  background: transparent;
  border: none;
  color: var(--deardocs-ha-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  border-radius: 4px;
  transition: background 0.2s;
}
.deardocs-help-assistant .deardocs-ha-close:hover {
  background: #f3f4f6;
  color: var(--deardocs-ha-text);
}
.deardocs-help-assistant .deardocs-ha-close svg {
  width: 20px;
  height: 20px;
}
.deardocs-help-assistant .deardocs-ha-search-wrapper {
  padding: 16px 20px;
  background: white;
}
.deardocs-help-assistant .deardocs-ha-search-input-container {
  position: relative;
  display: flex;
  align-items: center;
}
.deardocs-help-assistant .deardocs-ha-search-input-container svg {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--deardocs-ha-text-muted);
}
.deardocs-help-assistant .deardocs-ha-search-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 1px solid var(--deardocs-ha-border);
  border-radius: 10px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  background: #f9fafb;
}
.deardocs-help-assistant .deardocs-ha-search-input:focus {
  border-color: var(--deardocs-ha-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: white;
}
.deardocs-help-assistant .deardocs-ha-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}
.deardocs-help-assistant .deardocs-ha-results-container {
  padding: 0 10px;
}
.deardocs-help-assistant .deardocs-ha-result-item {
  display: block;
  padding: 16px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.2s;
  margin-bottom: 4px;
}
.deardocs-help-assistant .deardocs-ha-result-item:hover {
  background: rgba(37, 99, 235, 0.05);
}
.deardocs-help-assistant .deardocs-ha-result-title {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--deardocs-ha-text);
  margin-bottom: 4px;
}
.deardocs-help-assistant .deardocs-ha-result-excerpt {
  display: block;
  font-size: 13px;
  color: var(--deardocs-ha-text-muted);
  line-height: 1.5;
  margin: 0;
}
.deardocs-help-assistant .deardocs-ha-no-results {
  padding: 1rem;
  text-align: center;
  font-size: 1rem;
}
.deardocs-help-assistant .deardocs-ha-loading-shim {
  padding: 20px;
}
.deardocs-help-assistant .deardocs-ha-loading-shim span {
  display: block;
  height: 12px;
  background: #f3f4f6;
  margin-bottom: 12px;
  border-radius: 4px;
  animation: deardocs-pulse 1.5s infinite;
}
.deardocs-help-assistant .deardocs-ha-loading-shim span:nth-child(2) {
  width: 80%;
}
.deardocs-help-assistant .deardocs-ha-loading-shim span:nth-child(3) {
  width: 60%;
}
.deardocs-help-assistant .deardocs-ha-footer {
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--deardocs-ha-text-muted);
  border-top: 1px solid var(--deardocs-ha-border);
}
.deardocs-help-assistant .deardocs-ha-footer p {
  margin: 0;
}
.deardocs-help-assistant .deardocs-ha-footer strong {
  color: var(--deardocs-ha-primary);
}

@keyframes deardocs-pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}
@media (max-width: 480px) {
  .deardocs-ha-modal {
    width: calc(100vw - 40px);
    bottom: 70px;
  }
}