/* chat-style.css - v1.6.0 */

:root {
  --chatbot-theme-color: #f15430;
  --chatbot-theme-color-darker: #d9451e;
  --chatbot-theme-color-lighter: #fbece8;
  --chatbot-theme-color-border: #f9d1c7;
  --chatbot-theme-color-shadow: rgba(241, 84, 48, 0.2);
  --chatbot-text-color-on-theme: #ffffff;
}

#lvqh-chatbotai,
#lvqh-chatbotai div,
#lvqh-chatbotai span,
#lvqh-chatbotai button,
#lvqh-chatbotai input,
#lvqh-chatbotai a,
#lvqh-chatbotai img,
#lvqh-chatbotai p,
#lvqh-chatbotai b,
#lvqh-chatbotai svg,
#lvqh-chatbotai label,
#lvqh-chatbotai form {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  background: transparent;
  line-height: 1.5;
  color: #333;
}
#lvqh-chatbotai p { margin-bottom: 0.5em; }

#lvqh-chatbotai .lvqh-chat-container {
  position: fixed;
  bottom: 64px;
  right: 24px;
  width: 340px;
  max-width: 90vw;
  background: white;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999999 !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

#lvqh-chatbotai .lvqh-chat-container.position-bottom-left {
  right: auto;
  left: 24px;
}

#lvqh-chatbotai .lvqh-chat-container.collapsed {
  width: 200px;
  height: 200px;
  border: none;
  background-color: transparent;
  box-shadow: none;
  cursor: pointer;
  background-size: cover;
}
#lvqh-chatbotai .lvqh-chat-container.collapsed .lvqh-chat-header,
#lvqh-chatbotai .lvqh-chat-container.collapsed .lvqh-chat-content {
  display: none;
}
#lvqh-chatbotai .lvqh-chat-container.maximized {
  width: 100vw;
  height: 100vh;
  bottom: 0;
  right: 0;
  border-radius: 0;
}

#lvqh-chatbotai .lvqh-chat-header {
  background: var(--chatbot-theme-color);
  color: var(--chatbot-text-color-on-theme);
  padding: 0 12px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  height: 48px;
}
#lvqh-chatbotai .lvqh-chat-header-title {
    color: var(--chatbot-text-color-on-theme);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 48px;
    font-size: 15px;
}
#lvqh-chatbotai .header-buttons { display: flex; align-items: center; gap: 4px; }
#lvqh-chatbotai #lvqh-collapse-btn,
#lvqh-chatbotai #lvqh-maximize-btn,
#lvqh-chatbotai #lvqh-clear-btn {
  color: var(--chatbot-text-color-on-theme);
  cursor: pointer;
  padding: 4px;
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lvqh-chatbotai #lvqh-clear-btn svg {
    width: 16px;
    height: 16px;
}

#lvqh-chatbotai #lvqh-collapse-btn:hover,
#lvqh-chatbotai #lvqh-maximize-btn:hover,
#lvqh-chatbotai #lvqh-clear-btn:hover {
    background-color: rgba(255,255,255,0.2) !important;
    border-radius: 4px;
}

#lvqh-chatbotai .lvqh-chat-content { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; }
#lvqh-chatbotai .lvqh-chat-body { flex-grow: 1; height: 400px; overflow-y: auto; padding: 16px 12px; background: #ffffff; }
#lvqh-chatbotai .lvqh-chat-container.maximized .lvqh-chat-body { height: calc(100vh - 110px); }

#lvqh-chatbotai .lvqh-chat-msg { margin-bottom: 16px; display: flex; align-items: flex-end; position: relative; }
#lvqh-chatbotai .lvqh-chat-avatar { width: 36px; height: 36px; border-radius: 50%; margin: 0 8px; flex-shrink: 0; }
#lvqh-chatbotai .lvqh-chat-msg-content { 
  padding: 10px 14px; 
  border-radius: 18px; 
  max-width: 80%; 
  font-size: 14px; 
  line-height: 1.4;
  position: relative;
}
#lvqh-chatbotai .lvqh-chat-msg.bot .lvqh-chat-msg-content { 
  background: #f1f1f1; 
  color: #333; 
  border-bottom-left-radius: 4px; 
  padding-bottom: 35px;
  margin-right: auto;
}
#lvqh-chatbotai .lvqh-chat-msg.user { flex-direction: row-reverse; }
#lvqh-chatbotai .lvqh-chat-msg.user .lvqh-chat-msg-content { 
  background: #e0f7fa; 
  color: #111; 
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

#lvqh-chatbotai .lvqh-chat-msg-footer { font-size: 11px; color: #999; margin-top: 6px; }
#lvqh-chatbotai .lvqh-chat-msg.user .lvqh-chat-msg-footer { text-align: right; margin-right: 8px; }
#lvqh-chatbotai .action-buttons { 
  position: absolute; 
  bottom: 8px; 
  left: 14px; 
  display: flex; 
  gap: 8px; 
}
#lvqh-chatbotai .lvqh-chat-action-btn { 
  color: #888; 
  cursor: pointer; 
  padding: 2px; 
  border-radius: 4px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}
#lvqh-chatbotai .lvqh-chat-action-btn:hover { color: #000; background-color: #e9e9e9 !important; }
#lvqh-chatbotai .lvqh-chat-action-btn svg { width: 14px; height: 14px; }

#lvqh-chatbotai .lvqh-chat-input-area { display: flex; border-top: 1px solid #ddd; padding: 8px; background: #f9f9f9; align-items: center; }
#lvqh-chatbotai #lvqh-chat-input { flex: 1; border: 1px solid #ccc; padding: 10px; font-size: 14px; border-radius: 20px; outline: none; background: #fff; height: auto; }
#lvqh-chatbotai #lvqh-chat-input:focus { border-color: var(--chatbot-theme-color); box-shadow: 0 0 0 2px var(--chatbot-theme-color-shadow); }
#lvqh-chatbotai #lvqh-send-btn,
#lvqh-chatbotai #lvqh-attach-btn { color: var(--chatbot-theme-color); cursor: pointer; padding: 8px; font-size: 24px; line-height: 1; }

#lvqh-chatbotai #lvqh-chat-credit { padding: 8px; font-size: 12px; text-align: center; color: #aaa; background: #f1f1f1; border-top: 1px solid #e0e0e0; }
#lvqh-chatbotai #lvqh-chat-credit a { color: var(--chatbot-theme-color); text-decoration: none; font-weight: 600; }
#lvqh-chatbotai .thinking-text { font-style: italic; }
#lvqh-chatbotai .thinking-dots { display: inline-flex; align-items: center; }
#lvqh-chatbotai .thinking-dots span { width: 3px; height: 3px; margin: 0 2px; background-color: #888; border-radius: 50%; animation: fade-dot 1.4s infinite ease-in-out both; }
#lvqh-chatbotai .thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
#lvqh-chatbotai .thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes fade-dot { 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } }

#lvqh-chatbotai .video-container {
    position: relative; padding-bottom: 56.25%; height: 0;
    overflow: hidden; max-width: 100%; background: #000; margin: 10px 0; border-radius: 8px;
}
#lvqh-chatbotai .video-container iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* --- Styles for Suggested Questions --- */
#lvqh-chatbotai .suggested-questions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 5px 0;
}

#lvqh-chatbotai a.suggested-question {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 16px;
  background-color: var(--chatbot-theme-color-lighter);
  color: var(--chatbot-theme-color-darker);
  border: 1px solid var(--chatbot-theme-color-border);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

#lvqh-chatbotai a.suggested-question:hover {
  background-color: var(--chatbot-theme-color);
  border-color: var(--chatbot-theme-color);
  color: var(--chatbot-text-color-on-theme);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- Styles for User Info Form --- */
#lvqh-chatbotai #lvqh-user-info-form-container .lvqh-chat-msg-content {
  padding-bottom: 15px;
}

#lvqh-chatbotai #lvqh-user-info-form .form-field {
  margin-bottom: 12px;
}

#lvqh-chatbotai #lvqh-user-info-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 4px;
}

#lvqh-chatbotai #lvqh-user-info-form input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background-color: #fff !important;
  color: #333;
}

#lvqh-chatbotai #lvqh-user-info-form input:focus {
  border-color: var(--chatbot-theme-color);
  box-shadow: 0 0 0 2px var(--chatbot-theme-color-shadow);
  outline: none;
}

#lvqh-chatbotai #lvqh-user-info-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

#lvqh-chatbotai #lvqh-user-info-form button {
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 13px;
  border: none;
}

#lvqh-chatbotai #lvqh-user-info-form #lvqh-cancel-info-btn {
  background-color: #e0e0e0;
  color: #333;
}

#lvqh-chatbotai #lvqh-user-info-form #lvqh-cancel-info-btn:hover {
  background-color: #d1d1d1 !important;
}

#lvqh-chatbotai #lvqh-user-info-form #lvqh-submit-info-btn {
  background-color: var(--chatbot-theme-color);
  color: var(--chatbot-text-color-on-theme);
}

#lvqh-chatbotai #lvqh-user-info-form #lvqh-submit-info-btn:hover {
  background-color: var(--chatbot-theme-color-darker) !important;
}

#lvqh-chatbotai #lvqh-user-info-form #lvqh-submit-info-btn:disabled {
  background-color: var(--chatbot-theme-color-border) !important;
  cursor: not-allowed;
}

/* --- Style for disabled input area in 'enforce' mode --- */
#lvqh-chatbotai .lvqh-chat-input-area.disabled {
  background-color: #f0f0f0;
  cursor: not-allowed;
}

#lvqh-chatbotai .lvqh-chat-input-area.disabled input,
#lvqh-chatbotai .lvqh-chat-input-area.disabled button {
  pointer-events: none;
  opacity: 0.5;
}
/* --- Styles for Tables --- */
#lvqh-chatbotai .lvqh-chat-msg-content table {
  width: 100%;
  margin: 10px 0;
  border-collapse: collapse;
  font-size: 13px;
  color: #333;
}

#lvqh-chatbotai .lvqh-chat-msg-content th,
#lvqh-chatbotai .lvqh-chat-msg-content td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
}

#lvqh-chatbotai .lvqh-chat-msg-content th {
  background-color: var(--chatbot-theme-color-lighter);
  color: var(--chatbot-theme-color-darker);
  font-weight: 600;
}

#lvqh-chatbotai .lvqh-chat-msg-content tr:nth-child(even) {
  background-color: #f9f9f9;
}