
/* Root palette */

/* Sidebar buttons styling */
.hcr-sidebar-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.hcr-sidebar-buttons button {
  background: var(--hcr-background);
  color: var(--hcr-text);
  border: 1px solid var(--hcr-border);
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.hcr-sidebar-buttons button:hover,
.hcr-sidebar-buttons button:active {
  background: var(--hcr-gray-light);
  color: var(--hcr-text);
  box-shadow: 0 3px 6px rgba(0,0,0,0.10);
}


:root {
  --hcr-gray-light:   #e8e8e8;   /* prompt bubble & bot bubble */
  --hcr-gray-medium:  #dcdcdc;   /* user bubble & prompt hover */
  --hcr-gray-dark:    #4a4a4a;   /* send button */
  --hcr-border:       #ddd;      /* dividers, input border */
  --hcr-background:   #ffffff;   /* chat + sidebar background */
  --hcr-text:         #333333;   /* main text */
  --hcr-text-light:   #666666;   /* credit text, placeholder */
}

/* 1) Entire widget wrapper (two‐column flex) with border */
.hcr-ai-wrapper {
  display: flex;
  width: 100%;
  height: 90vh;               /* updated to 90% viewport height */
  background: var(--hcr-background);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid var(--hcr-border);
  border-radius: 8px;
  overflow: hidden;            /* ensure child corners don’t overflow */
  font-family: Arial, sans-serif;
}

/* 2) LEFT SIDEBAR */
.hcr-ai-sidebar {
  flex: 0 0 280px;             /* exactly 280px wide */
  background: var(--hcr-background);
  border-right: 1px solid var(--hcr-border);
  padding: 20px 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.prompt-heading {
  margin: 0 0 8px 0;           /* slightly less vertical gap */
  font-size: 1rem;
  font-weight: 600;
  color: var(--hcr-text);
}

.hcr-ai-sidebar .prompt-bubbles {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;              /* scroll area for prompts */
}

.hcr-ai-sidebar .bubble {
  background: var(--hcr-gray-light);
  border: none;
  color: var(--hcr-text);
  border-radius: 20px;         /* exact pill shape */
  padding: 8px 14px;           /* slightly less vertical padding */
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hcr-ai-sidebar .bubble:hover {
  background: var(--hcr-gray-medium);
}

.hcr-ai-sidebar hr {
  border: none;
  border-top: 1px solid var(--hcr-border);
  margin: 16px 0 8px 0;
}

.hcr-ai-sidebar .hcr-credit {
  margin: 0;
  font-size: 0.75rem;
  color: var(--hcr-text-light);
  text-align: left;
  padding-left: 2px;           /* match reference subtle inset */
}

/* 3) RIGHT CHAT AREA */
.hcr-ai-container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background: var(--hcr-background);
  box-sizing: border-box;
}

/* 3a) HEADER (buttons only) */
.hcr-ai-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: var(--hcr-background);   /* pure white */
  padding: 12px 20px;
  border-bottom: 1px solid var(--hcr-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  box-sizing: border-box;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.hcr-header-buttons button {
  background: var(--hcr-background);
  color: var(--hcr-text);
  border: 1px solid var(--hcr-border);
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  margin-left: 8px;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

/* Change hover to match active color (gray light) and same text color */
.hcr-header-buttons button:hover,
.hcr-header-buttons button:active {
  background: var(--hcr-gray-light);
  color: var(--hcr-text);
  box-shadow: 0 3px 6px rgba(0,0,0,0.10);
}

/* 3b) MESSAGES (scrollable) */
.hcr-ai-messages {
  flex: 1 1 auto;
  padding: 20px;
  overflow-y: auto;
  background: var(--hcr-background);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* bot bubble */
.hcr-ai-messages .message.bot {
  background: var(--hcr-gray-light);
  color: var(--hcr-text);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  align-self: flex-start;
  max-width: 65%;
  font-size: 0.95rem;
  line-height: 1.4;
  word-wrap: break-word;
}

/* user bubble (with “You:” prefix) */
.hcr-ai-messages .message.user {
  background: var(--hcr-gray-medium);
  color: var(--hcr-text);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  align-self: flex-end;
  max-width: 65%;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: right;
  word-wrap: break-word;
}

.user-prefix {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

/* 3c) LOADING INDICATOR */
#hcr-loading {
  display: none;
  text-align: center;
  font-style: italic;
  padding: 12px;
  background: var(--hcr-background);
  color: var(--hcr-text-light);
  border-top: 1px solid var(--hcr-border);
}

/* 3d) INPUT FORM (full width + Send) */
#hcr-ai-form {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--hcr-border);
  background: var(--hcr-background);
  padding: 10px 20px;
  box-sizing: border-box;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

#hcr-user-input {
  flex: 1;
  border: 1px solid #ccc;      /* exactly #ccc, not #ddd */
  border-radius: 24px;         /* big pill shape */
  padding: 10px 16px;
  font-size: 1rem;
  color: var(--hcr-text);
  background: var(--hcr-background);
  margin-right: 8px;
}

#hcr-user-input::placeholder {
  color: #999999;
  font-style: italic;
}

#hcr-send-button {
  background: var(--hcr-gray-dark);
  color: var(--hcr-background);
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

#hcr-send-button:hover {
  background: #393939;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* 4) RESPONSIVE: hide sidebar & flex‐column on small screens */
@media (max-width: 800px) {
  .hcr-ai-sidebar {
    display: none;
  }
  .hcr-ai-wrapper {
    flex-direction: column;
    height: auto;
  }
  .hcr-ai-container {
    width: 100%;
  }
  .hcr-ai-messages {
    height: 90vh;               /* updated to 90% viewport height */
  }
}

@media (max-width: 500px) {
  #hcr-user-input {
    font-size: 0.9rem;
  }
  #hcr-send-button {
    font-size: 0.9rem;
    padding: 8px 14px;
  }
  .hcr-header-buttons button {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}

/* Optional: Slim scrollbar in WebKit */
.hcr-ai-messages::-webkit-scrollbar {
  width: 6px;
}
.hcr-ai-messages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
.hcr-ai-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
}
