/* Global body styling */
body {
  font-family: Arial, sans-serif;
  background-color: #f2f2f2;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow:hidden
}


/* Heading */
.app-header {
  position: relative;      /* allows absolute positioning of children */
  text-align: center;      /* centers the heading text */
  padding: 20px 0;
  border-bottom: 1px solid #ddd;
}

.app-title {
  color: rgb(10, 10, 10);
  font-size: 28px;
  font-weight: bold;
  margin: 0;
}

.logout-btn {
  position: absolute;
  top: 15px;
  right: 25px;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.logout-btn:hover {
  background-color: #0056b3;
}


/* Chat container */
.chat-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  height: 650px;
  display: none;
}

/* Channel select section */
.channel-select {
  padding: 10px;
  background-color: #f1f1f1;
  border-bottom: 1px solid #ddd;
  display: none;

}

/* Chat box */
.chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background-color: #fafafa;
  display: flex;
  flex-direction: column;
}


/* Input box */
.input-box {
  display: flex;
  border-top: 1px solid #ddd;
  padding: 10px;
  background-color: #f9f9f9;
}

.input-box input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-right: 10px;
  flex-shrink: 0;
}

.input-box button {
  padding: 10px 20px;
  background-color: #0000ff;
  border: none;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

.input-box button:hover {
  background-color: #0000ff;
}

.bot-msg {
  display: flex;
  align-items: flex-start;
  margin: 10px 0;
}

/* Bot message wrapper - side by side avatar and bubble */
.message-wrapper {
  display: flex;              /* make avatar and bubble horizontal */
  align-items: flex-start;    /* align top of bubble and avatar */
  gap: 10px;                  /* space between avatar and bubble */
  margin: 10px 0;
}

/* Bot avatar */
.ai-avatar {
  font-size: 1.8rem;
  flex-shrink: 0;             /* prevent avatar from shrinking */
  margin-top: 2px;            /* optional: align with bubble */
}

/* Message bubble */
.message-bubble {
  background-color: #e0e0e0;
  color: #000;
  padding: 12px 16px;
  border-radius: 15px;
  max-width: 70%;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


/* Message text */
.message-content {
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Feedback buttons container */
.feedback-buttons {
  display: flex;
  gap: 5px;
  position: absolute;
  bottom: 2px;
  right: 10px;
}

/* Feedback buttons */
.feedback-buttons button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform 0.2s;
}

/* User messages */
/* Wrapper for user message */
.user-message-wrapper {
  display: flex;
  flex-direction: row;        /* Avatar next to message */
  align-items: flex-start;    /* Align avatar and bubble at top */
  justify-content: flex-end;  /* Right-align the whole message */
  margin: 10px 0;
  width: 100%;
}

/* User avatar */
.user-avatar {
  font-size: 1.8rem;
  margin-left: 10px;   /* Space between message bubble and avatar */
  margin-bottom: 0;
  align-self: flex-start;
}

/* User message bubble */
.user-msg {
  background-color: #0000ff;
  color: white;
  padding: 12px 16px;
  border-radius: 15px;
  max-width: 70%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-align: left;
  align-self: flex-end;
}



/* Message text */
.user-msg .message-content {
  line-height: 1.4;
}



.chat-container {
  display: none;
}

/* ===== Login Page Styles ===== */

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  width: 360px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.login-title {
  font-size: 1.8rem;
  color: #111827;
  margin-bottom: 8px;
}

.login-subtitle {
  color: #6b7280;
  font-size: 0.95rem;
  margin-bottom: 25px;
}

.login-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.login-input:focus {
  border-color: #6366f1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.login-button {
  width: 100%;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.login-button:hover {
  background: #4f46e5;
  transform: scale(1.02);
}

.login-button:active {
  transform: scale(0.98);
}



/* thubs up and down */
.thumbs-up {
  background: #e6faff;
  color: #2962ff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.2s, color 0.2s;
}

.thumbs-up:hover {
  background: #2962ff;
  color: #e6faff;
}

.thumbs-down {
  background: #ffe6e6;
  color: #d50000;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.thumbs-down:hover {
  background: #d50000;
  color: #ffe6e6;
}

.thumbs-up.active {
  background: #2962ff;
  color: #e6faff;
}

.thumbs-down.active {
  background: #d50000;
  color: #ffe6e6;
}

/* ===== Custom Message Box ===== */

.modal-overlay {
  position: fixed;       /* Overlay covers the entire viewport */
  z-index: 10000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;    /* Vertical center */
  justify-content: center; /* Horizontal center */
  padding: 20px;          /* Space around modal for smaller screens */
  box-sizing: border-box;
}

.modal-content {
  position: relative;     /* Needed for absolute close button */
  background: #fff;
  border-radius: 10px;
  padding: 30px 25px 20px 25px;
  min-width: 440px;
  min-height: 240px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-height: 80vh;       /* Prevent modal from overflowing */
  overflow-y: auto;
}

/* Modal heading */
.modal-content h3 {
  margin: 0 0 15px 0;
  padding-right: 30px;    /* Space for top-close button */
  font-size: 1.2rem;
  font-weight: 600;
}

/* Close button (top-right corner) */
#custom-prompt-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  color: #555;
  transition: color 0.2s;
}

#custom-prompt-close:hover {
  color: #000;
}

/* Textarea */
#custom-prompt-input {
  width: 100%;
  min-height: 200px;
  margin-bottom: 18px;
  font-size: 1.05rem;
  border-radius: 6px;
  border: 1px solid #bbb;
  padding: 8px;
  resize: vertical;
}

/* Bottom buttons container */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* OK button */
.modal-actions button#custom-prompt-ok {
  background: #6366f1;
  color: #fff;
  font-weight: bold;
  padding: 6px 15px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-actions button#custom-prompt-ok:hover {
  background: #4f46e5;
}

/* Cancel button */
.modal-actions button#custom-prompt-cancel {
  background: #e0e0e0;
  color: #333;
  font-weight: bold;
  padding: 6px 15px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-actions button#custom-prompt-cancel:hover {
  background: #d6d6d6;
}
