/* Universal Font Family */
* {
  font-family: 'Inter', sans-serif;
}

/* Modal Styles */
.hmd-ai-chat-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hmd-ai-chat-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.hmd-ai-chat-modal-content {
  position: relative;
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  background: #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.hmd-ai-chat-modal-header {
  background: #2a2a2a;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #3a3a3a;
}

.hmd-ai-chat-modal-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
}

.hmd-ai-chat-modal-close {
  background: none;
  border: none;
  color: #999;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.hmd-ai-chat-modal-close:hover {
  background: #3a3a3a;
  color: #fff;
}

.hmd-modal-open {
  overflow: hidden;
}

.hmd-ai-chat-modal .hmd-ai-chat-wrapper {
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  padding-bottom: 0;
}

.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: unset !important;
}


.hmd-ai-chat-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Inter', sans-serif;
}

.hmd-ai-chat-wrapper {
  background: #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  /* height: 600px; */
  padding-bottom: 35px;
}

.hmd-ai-chat-header {
  background: #2a2a2a;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #3a3a3a;
}

.hmd-ai-chat-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hmd-ai-chat-avatar,
.hmd-message-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.hmd-ai-chat-avatar-placeholder,
.hmd-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #01A3EE 0%, #0471B9 100%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 18px;
}

.hmd-ai-chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hmd-ai-chat-title {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
}

.hmd-ai-chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9ca3af;
  font-size: 13px;
}

.hmd-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.hmd-ai-chat-minimize {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.hmd-ai-chat-minimize:hover {
  background: #3a3a3a;
  color: #ffffff;
}

.hmd-ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #1a1a1a;
}

.hmd-ai-chat-messages::-webkit-scrollbar {
  width: 8px;
}

.hmd-ai-chat-messages::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.hmd-ai-chat-messages::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 4px;
}

.hmd-ai-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

.hmd-ai-message,
.hmd-user-message {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hmd-user-message {
  flex-direction: row-reverse;
}

.hmd-message-avatar {
  flex-shrink: 0;
}

.hmd-message-content {
  flex: 1;
  max-width: 70%;
}

.hmd-user-message .hmd-message-content {
  display: flex;
  justify-content: flex-end;
}

.hmd-message-bubble {
  background: #2a2a2a;
  color: #e5e7eb;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.5;
  font-size: 14px;
}

.hmd-user-message .hmd-message-bubble {
  background: #667eea;
  color: #ffffff;
  border-radius: 16px 16px 4px 16px;
}

.hmd-ai-message .hmd-message-bubble {
  border-radius: 16px 16px 16px 4px;
}

.hmd-message-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.hmd-message-action {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.hmd-message-action:hover {
  color: #9ca3af;
  background: #2a2a2a;
}

/* .hmd-ai-chat-input-wrapper {
  padding: 16px 20px;
  background: #2a2a2a;
  border-top: 1px solid #3a3a3a;
} */
.hmd-ai-chat-input:focus{
  border: none !important;
}
.hmd-ai-chat-form {
  width: 100%;
}

.hmd-ai-chat-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1a1a;
  border-radius: 24px;
  padding: 8px 12px;
  border: 1px solid #3a3a3a;
  transition: border-color 0.2s;
}

.hmd-ai-chat-input-container:focus-within {
  border-color: #667eea;
}

.hmd-ai-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 14px;
  padding: 8px;
  outline: none;
}

.hmd-ai-chat-input::placeholder {
  color: #6b7280;
}

.hmd-ai-chat-send,
.hmd-ai-chat-voice {

  background: linear-gradient(135deg, #01A3EE 0%, #0471B9 100%) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(184, 179, 188, 0.3);
  cursor: pointer !important;
  padding: 8px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.2s !important;
}

.hmd-ai-chat-send:hover,
.hmd-ai-chat-voice:hover {
  background: #3a3a3a;
  color: #ffffff;
}

.hmd-ai-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hmd-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.hmd-typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
  animation: typing 1.4s infinite;
}

.hmd-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.hmd-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }

  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.hmd-ai-chat-error {
  background: #fee;
  color: #c33;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .hmd-ai-chat-container {
    padding: 10px;
  }

  .hmd-ai-chat-wrapper {
    height: 500px;
  }

  .hmd-message-content {
    max-width: 85%;
  }
}

/* Formatting for AI responses */
.hmd-message-bubble p {
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.hmd-message-bubble p:last-child {
  margin-bottom: 0;
}

.hmd-message-bubble strong {
  font-weight: 600;
  color: #fff;
}

.hmd-message-bubble em {
  font-style: italic;
  color: #e0e0e0;
}

.hmd-message-bubble code {
  background: #333;
  color: #00d4aa;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Inter', monospace;
  font-size: 0.9em;
}

.hmd-message-bubble pre {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0;
  overflow-x: auto;
}

.hmd-message-bubble pre code {
  background: none;
  color: #f8f8f2;
  padding: 0;
  font-size: 0.85em;
  line-height: 1.4;
  display: block;
  white-space: pre;
}

.hmd-message-bubble .numbered-list-item,
.hmd-message-bubble .bullet-list-item {
  display: flex;
  align-items: flex-start;
  margin: 4px 0;
  line-height: 1.5;
}

.hmd-message-bubble .list-number,
.hmd-message-bubble .bullet {
  color: #00d4aa;
  font-weight: 600;
  margin-right: 8px;
  min-width: 20px;
}

.hmd-message-bubble .bullet {
  min-width: 12px;
}

/* Step Management */
.hmd-chat-step {
  width: 100%;
  height: 100%;
  transition: all 0.3s ease-in-out;
}

.hmd-step-active {
  display: block;
  opacity: 1;
  transform: translateX(0);
  overflow: scroll;
}

.hmd-step-hidden {
  display: none;
  opacity: 0;
  transform: translateX(100%);
}

/* Landing Page Styles */
.hmd-ai-chat-landing {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.hmd-landing-content {
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.hmd-landing-header {
  margin-bottom: 60px;
}

.hmd-landing-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 24px;
  display: block;
  border: 3px solid #667eea;
}

.hmd-landing-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 32px;
  margin: 0 auto 24px;
  border: 3px solid #667eea;
}

.hmd-landing-title {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  line-height: 1.2;
}

.hmd-landing-subtitle {
  color: #9ca3af;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

.hmd-landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.hmd-feature-item {
  text-align: center;
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.hmd-feature-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: #667eea;
}

.hmd-feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
}

.hmd-feature-item h3 {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.hmd-feature-item p {
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.hmd-landing-cta {
  margin-top: 40px;
}

.hmd-chat-start-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.hmd-chat-start-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* User Information Form Styles */
.hmd-user-info-form {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.hmd-form-content {
  max-width: 600px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hmd-form-header {
  text-align: center;
  margin-bottom: 40px;
}

.hmd-form-title {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.hmd-form-subtitle {
  color: #0399e4;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #01A3EE 0%, #0471B9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hmd-user-form {
  width: 100%;
}

.hmd-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.hmd-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hmd-form-group-full {
  margin-bottom: 20px;
}

.hmd-form-group label {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

.hmd-form-group input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  color: #ffffff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.hmd-form-group input:focus {
  outline: none;
  border-color: #0399e4;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.hmd-form-group input::placeholder {
  color: #9ca3af;
}

.hmd-form-checkboxes {
  margin: 30px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hmd-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hmd-checkbox-group input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #0399e4;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.hmd-checkbox-group label {
  color: #e5e7eb;
  font-size: 0.83rem;
  line-height: 1.5;
  cursor: pointer;
  margin: 0;
}

.hmd-form-submit {
  text-align: center;
  margin: 40px 0 30px 0;
}

.ai-360-start-chat-button {
  background: linear-gradient(135deg, #01A3EE 0%, #0471B9 100%) !important;
  color: white !important;
  border: none !important;
  padding: 16px 40px !important;
  border-radius: 50px !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 20px rgba(184, 179, 188, 0.3);
  min-width: 130px;
}

.ai-360-start-chat-button:hover {
  transform: translateY(-2px);
}

.ai-360-start-chat-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.hmd-form-disclaimer {
  text-align: center;
  margin-top: 20px;
}

.hmd-form-disclaimer p {
  color: #9ca3af;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

.hmd-ai-policy-link {
  color: #0399e4;
  text-decoration: none;
}

.hmd-ai-policy-link:hover {
  text-decoration: underline;
}

.hmd-form-message {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.hmd-form-message.success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.hmd-form-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Responsive Styles for New Components */
@media (max-width: 768px) {
  .hmd-landing-title {
    font-size: 2rem;
  }

  .hmd-landing-subtitle {
    font-size: 1rem;
  }

  .hmd-landing-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hmd-feature-item {
    padding: 20px 15px;
  }

  .hmd-form-content {
    padding: 30px 20px;
    margin: 20px;
  }

  .hmd-form-title {
    font-size: 1.5rem;
  }

  .hmd-form-subtitle {
    font-size: 1.8rem;
  }

  .hmd-form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .hmd-chat-start-button,
  .ai-360-start-chat-button {
    width: 100%;
    padding: 14px 24px;
  }
}

@media (max-width: 480px) {
  .hmd-ai-chat-container {
    padding: 5px;
  }

  .hmd-landing-content,
  .hmd-form-content {
    padding: 20px 15px;
  }

  .hmd-landing-title {
    font-size: 1.8rem;
  }

  .hmd-form-title {
    font-size: 1.3rem;
  }

  .hmd-form-subtitle {
    font-size: 1.5rem;
  }
}
input#hmd-ai-chat-input {
    border: none !important;
}