/* Holy Quran Learning — Chat Widget Styles */
:root {
  --hql-green: #1a4d2e;
  --hql-green-dark: #123821;
  --hql-gold: #c9a24b;
  --hql-cream: #faf7f0;
  --hql-text: #2b2b2b;
}

#hql-chat-bubble {
  position: fixed !important;
  bottom: 100px !important;
  right: 20px !important;
  top: auto !important;
  left: auto !important;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1e5a36, var(--hql-green-dark));
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35), inset 0 1px 2px rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  z-index: 9999;
  transition: transform 0.2s ease;
}
#hql-chat-bubble:hover { transform: scale(1.08); }

@media (max-width: 480px) {
  #hql-chat-bubble {
    bottom: 110px !important;
    right: 16px !important;
    width: 56px;
    height: 56px;
  }
  #hql-chat-window {
    bottom: 178px;
    right: 12px;
    width: calc(100vw - 24px);
  }
}

#hql-chat-window {
  position: fixed;
  bottom: 172px;
  right: 20px;
  width: 340px;
  max-width: 90vw;
  height: 460px;
  max-height: 75vh;
  background: var(--hql-cream);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
#hql-chat-window.open { display: flex; }

#hql-chat-header {
  background: var(--hql-green);
  color: white;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#hql-chat-header .title { font-weight: 600; font-size: 15px; }
#hql-chat-header .subtitle { font-size: 12px; color: var(--hql-gold); margin-top: 2px; }
#hql-chat-close {
  background: none; border: none; color: white; font-size: 20px; cursor: pointer; line-height: 1;
}

#hql-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hql-msg {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.4;
}
.hql-msg.bot {
  background: white;
  color: var(--hql-text);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.hql-msg.user {
  background: var(--hql-green);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.hql-msg.typing { color: #888; font-style: italic; }

#hql-chat-input-row {
  display: flex;
  border-top: 1px solid #e5e0d5;
  padding: 10px;
  gap: 8px;
  background: white;
}
#hql-chat-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13.5px;
  outline: none;
}
#hql-chat-input:focus { border-color: var(--hql-green); }
#hql-chat-send {
  background: var(--hql-green);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 0 16px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
}
#hql-chat-send:hover { background: var(--hql-green-dark); }
#hql-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
