#chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-family: sans-serif;
  z-index: 9999;  /* Ensure it's above other elements */
}

#chatbot-toggle img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  background: white;
  transition: transform 0.3s ease;
  object-fit: cover;
  z-index: 10000; /* Make sure the toggle is always above the chat window */
}

#chatbot-toggle img:hover {
  transform: scale(1.1);
}

#chatbot-window {
  width: 300px;
  height: 400px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: fixed;
  bottom: 100px; /* Position above the toggle */
  right: 20px;
  visibility: hidden; /* Initially hidden */
  z-index: 9998; /* Ensure it's below the toggle */
}

.hidden {
  visibility: hidden;
}

#chatbot-header {
  background: #1f2937;
  color: white;
  padding: 10px;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#chatbot-close {
  cursor: pointer;
  font-size: 20px;
  line-height: 1;     /* tighten vertical spacing */  
  padding: 6px;       /* optional: reduce hit‑area padding */
  padding-right: 6px;
  padding-left: 6px;
}

#chatbot-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 14px;
  background: #f9fafb;
}

#chatbot-form {
  display: flex;
  border-top: 1px solid #ddd;
}

#chatbot-input {
  flex: 1;
  padding: 10px;
  border: none;
  font-size:16px;
}

#chatbot-form button {
  padding: 10px;
  background: #3b82f6;
  border: none;
  color: white;
  cursor: pointer;
}

.user, .bot {
  margin-bottom: 12px;
  padding: 6px 8px;
  border-radius: 8px;
}

.user {
  background: #dbeafe;
  text-align: right;
}

.bot {
  background: #e5e7eb;
  text-align: left;
}

/* 2. Mobile override: full screen at <=600px */
@media screen and (max-width: 600px) {       /* target mobile widths */
  #chatbot-window {
    width: 100vw;                            /* full viewport width */
    height: 70vh;                           /* full viewport height */
    bottom: 0;                               /* align to bottom edge */ 
    right: 0;                                /* align to right edge */ 
  }

  /* Ensure the toggle button stays above the full‑screen window */
  #chatbot-toggle {
    bottom: auto;
    top: 20px;       /* e.g. move toggle to top if needed */
    right: 20px;
    z-index: 10001;  /* above the now‑full‑screen window */
  }
}

input, select, textarea {
  font-size: 16px;  /* prevent iOS from auto‑zooming */  
}
