/* ReputaGuard — CleverT floating chat widget styles */

.clevert-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: transform 0.2s, box-shadow 0.2s;
}

.clevert-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.clevert-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9998;
  font-family: system-ui, -apple-system, sans-serif;
  color: #101828;
}

.clevert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #2563eb;
  color: #fff;
}

.clevert-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clevert-avatar {
  font-size: 1.5rem;
}

.clevert-header strong {
  font-size: 0.95rem;
}

.clevert-sub {
  font-size: 0.75rem;
  opacity: 0.85;
}

.clevert-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.8;
}

.clevert-close:hover {
  opacity: 1;
}

.clevert-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  scroll-behavior: smooth;
}

.clevert-msg {
  margin-bottom: 12px;
}

.clevert-msg-content {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 90%;
}

.clevert-bot .clevert-msg-content {
  background: #f1f5f9;
  border-bottom-left-radius: 4px;
  color: #101828;
}

.clevert-user .clevert-msg-content {
  background: #2563eb;
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.clevert-msg-content p { margin: 0 0 0.5em; }
.clevert-msg-content p:last-child { margin-bottom: 0; }
.clevert-msg-content ul { margin: 0.3em 0 0.5em 1.2em; padding: 0; }
.clevert-msg-content li { margin-bottom: 0.2em; }
.clevert-msg-content strong { font-weight: 600; }
.clevert-msg-content h2, .clevert-msg-content h3, .clevert-msg-content h4 { margin: 0.6em 0 0.3em; }
.clevert-msg-content blockquote { margin: 0.4em 0; padding: 0.4em 0.8em; border-left: 3px solid #2563eb; background: #eff4ff; border-radius: 4px; font-style: italic; }
.clevert-msg-content code { background: rgba(0,0,0,0.06); padding: 0.1em 0.3em; border-radius: 3px; font-size: 0.85em; }
.clevert-msg-content hr { border: none; border-top: 1px solid #e4e9f0; margin: 0.8em 0; }

.clevert-user .clevert-msg-content strong { color: #fff; }

.clevert-login-hint {
  padding: 8px 14px;
  text-align: center;
  border-top: 1px solid #e4e9f0;
  background: #f8fafc;
}

.clevert-cta {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  padding: 6px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  margin-right: 8px;
}

.clevert-cta:hover { background: #1d4ed8; }

.clevert-login-link {
  color: #475467;
  font-size: 0.8rem;
  text-decoration: underline;
}

.clevert-form {
  display: flex;
  padding: 10px 12px;
  border-top: 1px solid #e4e9f0;
  gap: 8px;
}

.clevert-input {
  flex: 1;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

.clevert-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.clevert-send {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clevert-send:hover { background: #1d4ed8; }

/* Mobile */
@media (max-width: 480px) {
  .clevert-panel {
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  .clevert-toggle {
    bottom: 16px;
    right: 16px;
  }
}
