/* =======================
   CHATBOT-SPECIFIC STYLES
   ======================= */

/* Base layout and general styles */
.ilfusion-chatbot {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #ffffff;
  color: #666666;
  /*min-height: 100vh;*/
  display: flex;
  flex-direction: column; 
}

.ilfusion-chatbot main {
  flex: 1;
}

.ilfusion-chatbot header {
  background-color: #E94E1B;
  padding: 1rem;
  color: #ffffff;
  text-align: center;
}

.ilfusion-chatbot nav a {
  margin: 0 1rem;
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
}

.ilfusion-chatbot .hero {
  background-color: #0072CE;
  color: #ffffff;
  padding: 4rem 2rem;
  text-align: center;
}

.ilfusion-chatbot .hero h1 {
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.ilfusion-chatbot .hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.ilfusion-chatbot .cta-button {
  background-color: #E94E1B;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.ilfusion-chatbot .about {
  padding: 3rem 2rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ilfusion-chatbot .about h3 {
  margin-bottom: 1rem;
}

.ilfusion-chatbot footer {
  background-color: #f5f5f5;
  color: #666666;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  margin-top: auto;
}

/* ==================
   CHAT WIDGET STYLES
   ================== */

#chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 380px;
  height: 500px;
  max-height: 80vh;
  background-color: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
}

#chat-body {
  transition: all 0.3s ease;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background-color: #f8f9fa;
  font-size: 14px;
}

#chat-input-container {
  padding: 10px;
  background: #fff;
}

#chat-input {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 2px solid #0072CE !important;
  border-radius: 25px !important;
  outline: none !important;     
  box-sizing: border-box;
}

#chat-input:focus {
  border-color: #0072CE !important;
  box-shadow: 0 0 5px rgba(0, 114, 206, 0.3) !important;
}

.chat-bubble {
  border-radius: 16px;
  background: #f9f9f9;
  border: 2px solid #4285f4;
  padding: 10px 15px;
  margin-bottom: 10px;
  max-width: 90%;
  word-wrap: break-word;
}

/* ========================
   MOBILE RESPONSIVE STYLES
   ======================== */

@media (max-width: 768px) {
  body.ilfusion-chatbot-active {
    height: 100%;
    overflow: hidden;
    touch-action: none;
  }

  html.ilfusion-chatbot-active {
    height: 100%;
    overflow: hidden;
    touch-action: none;
  }

  #chat-widget {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100dvh;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    box-sizing: border-box;
    overflow: hidden;
  }

  #chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    padding-bottom: 120px;
    box-sizing: border-box;
  }

  #chat-input-container {
    position: fixed;
    height: auto;
    bottom: 25px !important;
    left: 10px;
    right: 10px;
    background: transparent;
    border-top: none;
    padding: 0;
    z-index: 10000;
    box-sizing: border-box;
  }

  #chat-input {
    width: 100%;
    font-size: 16px;
    padding: 15px 20px;
    box-sizing: border-box;
    border: 2px solid #0072CE !important;
    border-radius: 25px !important;
    outline: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
    background: #fff;
    color: #333;
    transition: all 0.2s ease;
  }

  #chat-input::placeholder {
    color: #999 !important;
    font-style: italic; 
  }

  #chat-input:focus {
    border-color: #0072CE !important;
    box-shadow: 0 2px 12px rgba(0, 114, 206, 0.3), 0 0 0 3px rgba(0, 114, 206, 0.1) !important;
    transform: translateY(-1px);
    transition: all 0.2s ease;
  }

  .ilfusion-chatbot footer {
    display: none !important;
  }
}