/* chat-popup.css - Tawk.to Chat Popup Styles */

/* ========== Circle Bubble ========== */
#chatbot-launcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.25s ease;
  background: #000;
}
#chatbot-launcher:hover { transform: scale(1.1); }
#chatbot-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== Popup (bottom-right) ========== */
#chatbot-modal {
  display: none;
  justify-content: flex-end;
  align-items: flex-end;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 10000;
  padding: 20px;
}
.modal-content {
  background: transparent;
  box-shadow: none;
  padding: 0;
  width: auto;
  position: relative;
  margin-bottom: 100px;
  margin-right: 20px;
  animation: fadeInUp 0.3s ease;
}
#popupVideo {
  width: 260px;
  height: 300px;
  border-radius: 15px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.5);
  object-fit: cover;
}

/* Close button */
#close-modal {
  position: absolute;
  top: -12px;
  right: -12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  width: 32px;
  height: 32px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10001;
  transition: background 0.2s;
}
#close-modal:hover { background: rgba(255,0,0,0.8); }

/* Branding */
.branding {
  text-align: center;
  margin-top: 5px;
}
.branding h3 {
  font-size: 18px;
  color: #007bff;
  margin: 5px 0 0;
}
.branding p {
  font-size: 13px;
  color: #007bff;
  margin: 2px 0 10px;
}
#start-chat {
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 6px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}
#start-chat:hover { background-color: #0056b3; }

/* ========== Embedded Chat Box ========== */
#embedded-chat-container {
  display: none;
  flex-direction: column;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 380px;
  height: 500px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 25px rgba(0,0,0,0.3);
  overflow: hidden;
  z-index: 10001;
}
.chat-header {
  background: #007bff;
  color: #fff;
  padding: 10px 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-header button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
#tawk-iframe {
  border: none;
  width: 100%;
  height: 100%;
}

/* ========== Responsive (Mobile / Small Screens) ========== */
@media (max-width: 600px) {
  #chatbot-launcher {
    width: 70px;
    height: 90px;
    bottom: 12px;
    right: 22px;
  }
  .modal-content {
    margin: 0 auto 90px auto; /* center on small screens */
  }
  #popupVideo {
    width: 200px;
    height: 180px;
  }
  #close-modal {
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    font-size: 18px;
    line-height: 26px;
  }
  .branding h3 { font-size: 16px; }
  .branding p { font-size: 12px; }
  #start-chat {
    padding: 5px 14px;
    font-size: 12px;
  }
  #embedded-chat-container {
    width: 90vw;
    height: 75vh;
    bottom: 10px;
    right: 5vw;
  }
}
@media (max-width: 380px) {
  #chatbot-launcher {
    width: 60px;
    height: 60px;
  }
  #popupVideo {
    width: 160px;
    height: 95px;
  }
  #start-chat {
    font-size: 11px;
    padding: 4px 12px;
  }
}

/* Hide any Tawk.to launcher before it loads */
iframe[src*="tawk.to"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}