/* ==== Animations ==== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(20px); }
}
@keyframes pulse-glow {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; box-shadow: 0 0 20px 10px rgba(0, 194, 203, 0.7); }
  70% { transform: translate(-50%, -50%) scale(2.5); opacity: 0.2; box-shadow: 0 0 40px 20px rgba(0, 194, 203, 0.2); }
  100% { opacity: 0; }
}
@keyframes fadeInGreeting {
  from { opacity: 0; transform: translateY(-50%) scale(0.96); }
  to { opacity: 1; transform: translateY(-50%) scale(1); }
}
@keyframes fadeInChar {
  from { opacity: 0; filter: blur(1px); }
  to { opacity: 1; filter: blur(0); }
}
@keyframes wave {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}
/* ==== Chatbox Container & Icon ==== */
#chatbox-container {
  position: fixed;
  bottom: 35px;
  right: 40px;
  z-index: 1000;
}
@media (max-width: 600px) {
  #chatbox-container {
    bottom: 25px;
    right: 20px;
  }
}
#chatbox-icon {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 15px 5px rgba(179, 234, 234, 0.5);
  overflow: visible;
}
#chatbox-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  box-shadow: 0 0 20px rgba(0, 194, 203, 0.7);
  opacity: 0.9;
  animation: pulse-glow 2.5s infinite;
  pointer-events: none;
}
#chatbox-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px 10px rgba(179, 234, 234, 0.7);
}
.chatbox-icon-img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
}
.chatbox-greeting {
  position: absolute;
  top: 50%;
  right: 70px;
  transform: translateY(-50%) scale(1);
  background: #00c2cb;
  color: #fff;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 2;
  opacity: 1;
  transition: opacity 0.6s ease, transform 0.35s ease;
  animation: fadeInGreeting 0.6s ease;
}
.chatbox-greeting::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #00c2cb;
  border-radius: 3px;
}
.chatbox-greeting.hidden {
  opacity: 0;
  transform: translateY(-50%) scale(0.96);
  pointer-events: none;
}
/* ==== Chatbox Window ==== */
#chatbox-window {
  width: 50vw;
  height: 90vh;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.25), 0 6px 12px rgba(0,0,0,0.15);
  border: none;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease;
  filter: drop-shadow(0 8px 16px rgba(0,194,203,0.25));
  letter-spacing: 0.2px;
  bottom: 20px;
  right: 20px;
  position: fixed;
}
@media (max-width: 600px) {
  #chatbox-window {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    margin: auto;
    width: 95vw;
    height: 90vh;
  }
}
/* ==== Chatbox Header ==== */
#chatbox-header {
  background: #00aab2;
  color: white;
  padding: 0 20px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  height: 44px;
  min-height: 44px;
  letter-spacing: 0.2px;
}
.chatbox-title-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #fff;
  font-size: 16px;
}
.chatbox-title-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.1);
}
#chatbox-close {
  cursor: pointer;
  font-size: 26px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
#chatbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(90deg) scale(1.15);
}
/* ==== Chatbox Messages ==== */
#chatbox-messages {
  flex-grow: 1;
  padding: 15px 15px 100px;
  overflow-y: auto;
  background-color: #fefefe;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  scroll-behavior: smooth;
}
#chatbox-messages::after {
  content: "";
  position: sticky;
  bottom: 0;
  height: 30px;
  background: linear-gradient(to top, #fefefe 30%, transparent);
  pointer-events: none;
  z-index: 1;
}
.chat-message {
  padding: 10px 14px;
  border-radius: 15px;
  max-width: 80%;
  font-size: 15px;
  line-height: 1.55;
  word-wrap: break-word;
}
.chat-message.user {
  background-color: #00c2cb;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  margin: 10px;
}
.chat-message.bot > * {
  margin: 10px 0;
}
.chat-message.bot {
  color: #333;
  align-self: center;
  width: 100%;
  max-width: 720px;
  border-radius: 10px;
  border-bottom-left-radius: 5px;
  padding: 10px 10px;
}
.chat-message.bot a {
  color: #00c2cb;
  text-decoration: underline;
}
.chat-message.bot .chat-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 8px 0;
  display: block;
}
.chat-message.bot h1,
.chat-message.bot h2,
.chat-message.bot h3,
.chat-message.bot h4,
.chat-message.bot h5 {
  color: #333;
  line-height: 1.4;
  margin: 10px 0;
}
.chat-message.bot h1 { font-size: 28px; font-weight: 600; }
.chat-message.bot h2 { font-size: 24px; font-weight: 600; }
.chat-message.bot h3 { font-size: 20px; font-weight: 500; }
.chat-message.bot h4 { font-size: 18px; font-weight: 500; }
.chat-message.bot h5 { font-size: 16px; font-weight: 500; }
.chat-message.bot ul,
.chat-message.bot ol {
  margin: 10px 0;
  padding-left: 20px;
}
.chat-message.bot li {
  margin-bottom: 8px;
}
.chat-message.bot li:last-child {
  margin-bottom: 12px !important;
}
.chat-message.bot li::marker {
  font-size: 10px;
  color: #666;
}
/* ==== Bot Typing Effect ==== */
.chat-message.bot span.typing-char {
  opacity: 0;
  animation: fadeInChar 0.2s forwards;
}
.chat-message.bot .typing-block {
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: fadeFromLeft 0.5s ease-out forwards;
  will-change: opacity, transform;
}
/* ==== Input Area ==== */
#chatbox-input {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 16px 12px;
  background-color: #ffffff;
  border-radius: 0 0 12px 12px;
}
#chatbox-input::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -20px;
  height: 20px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff 80%);
  pointer-events: none;
  z-index: 1;
}
#chat-input {
  flex-grow: 1;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 48px 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.55;
  background-color: #f9fafb;
  color: #111827;
  transition: border 0.2s, box-shadow 0.2s, background-color 0.2s;
  overflow-y: auto;
}
#chat-input:focus {
  outline: none;
  border-color: #00c2cb;
  box-shadow: 0 0 0 2px rgba(0, 194, 203, 0.2);
}
#chat-send {
  position: absolute;
  right: 25px;
  height: 36px;
  width: 36px;
  border-radius: 50%;
  border: none;
  background-color: #00c2cb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
#chat-send:hover {
  background-color: #009ba3;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 194, 203, 0.3);
}
/* ==== Prompt (Membership) ==== */
.chatbox-prompt {
  text-align: center;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 8px;
  margin: 10px;
  color: #333;
}
/* ==== Buttons (General, Quick Actions, Map, Zoom, Download, Yes) ==== */
.btn {
  background-color: transparent;
  color: #ff5757;
  border: 1px solid #ff5757;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.btn:hover {
  background-color: #ff5757;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 194, 203, 0.3);
  transform: translateY(-2px);
}
.chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
  padding: 10px 10px;
  justify-content: center;
}
.chat-quick-actions button {
  border: 1px solid rgb(51, 51, 51);
  background: #fff;
  color: rgb(51, 51, 51);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.chat-quick-actions button:hover {
  background: rgb(51, 51, 51);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.chat-quick-actions .btn i {
  margin-right: 5px;
  margin-left: 2px;
  color: #ff5757;
}
.chat-quick-actions button:hover i {
  color: #fff;
}
.map-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  justify-content: center;
  padding-top: 10px;
}
.download-btn, .zoom-btn {
  border: 1px solid #666;
  background: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #666 !important;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none !important;
}
.download-btn i, .zoom-btn i {
  margin-right: 5px;
  font-size: 12px;
}
.download-btn:hover, .zoom-btn:hover {
  background: #00c2cb;
  color: #fff !important;
  border-color: #00c2cb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 194, 203, 0.3);
}
.download-btn:hover i, .zoom-btn:hover i {
  color: #fff;
}
.download-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.download-btn.disabled:hover::after {
  content: attr(title);
  position: absolute;
  background: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
}
.prompt-extension {
  margin-top: 10px;
  font-style: italic;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.yes-btn {
  border: 1px solid rgb(221, 221, 221);
  background: #fff;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: rgb(102, 102, 102);
  transition: transform 0.15s, background 0.2s, color 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  margin-left: 8px !important;
}
.yes-btn:hover {
  background: rgb(240, 240, 240);
  color: rgb(85, 85, 85);
  border-color: rgb(204, 204, 204);
  transform: translateY(-1px);
  box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 6px;
}
/* ==== Contact Button (WhatsApp / Future Contact Features) ==== */
.contact-btn {
  border: 1px solid #25d366;
  background: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #25d366 !important;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none !important;
}

.contact-btn-container {
  text-align: center;
  margin-top: 16px;
}

.contact-btn i {
  margin-right: 5px;
  font-size: 12px;
}

.contact-btn:hover {
  background: #25d366;
  color: #fff !important;
  border-color: #25d366;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.contact-btn:hover i {
  color: #fff;
}
/* ==== Zoom Popup ==== */
#chatbox-zoom-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.25);
  filter: drop-shadow(0 8px 16px rgba(0,194,203,0.25));
  z-index: 1001;
  display: none;
}
#chatbox-zoom-popup:not(.hidden) {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.zoom-content {
  position: relative;
  max-width: 80vw;
  max-height: 80vh;
}
#zoom-image, .zoom-image {
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}
#zoom-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #00c2cb;
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}
#zoom-close:hover {
  background: #009ba3;
  transform: rotate(90deg) scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 194, 203, 0.3);
}
/* ==== Register Popup ==== */
#register-popup {
  position: fixed;
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.25);
  filter: drop-shadow(0 8px 16px rgba(0,194,203,0.25));
  z-index: 1001;
  display: none;
  width: 50vw;
  max-width: 500px;
  min-width: 300px;
}
#register-popup:not(.hidden) {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.register-content {
  position: relative;
  width: 100%;
  padding: 30px 0 10px;
}
#register-close {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #00c2cb;
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
  z-index: 1002;
}
#register-close:hover {
  background: #009ba3;
  transform: rotate(90deg) scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 194, 203, 0.3);
}
.wpcf7-form {
  width: 100%;
  padding: 20px;
}
.wpcf7-form p {
  margin-bottom: 15px;
}
.wpcf7-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  font-size: 14px;
}
.wpcf7-form input[type="submit"] {
  background-color: #00c2cb;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.wpcf7-form input[type="submit"]:hover {
  background-color: #009ba3;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 194, 203, 0.3);
}
.wpcf7-form input[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 600px) {
  #register-popup {
    left: 50%;
    width: 95vw;
    max-width: 95%;
    padding: 10px;
  }
  .register-content {
    max-width: 100%;
    padding: 50px 10px 20px;
  }
  .wpcf7-form {
    padding: 10px;
  }
  #register-close {
    top: 10px;
    right: 10px;
  }
  #zoom-image, .zoom-image {
    max-width: 95vw;
    max-height: 85vh;
  }
}
/* ==== Summary Container ==== */
.summary-container {
  background-color: #fafefe;
  padding: 10px;
  border-radius: 5px;
  margin-top: 10px;
}
.summary-container h4 {
  color: #00c2cb;
  margin: 10px 0 5px;
  font-size: 16px;
}
.summary-container p {
  color: #333;
  margin: 0 0 10px;
  font-size: 15px;
}
/* ==== Wave Loading Effect ==== */
.wave-loading {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 20px;
  margin: 5px 10px;
}
.wave-loading .dot {
  width: 6px;
  height: 6px;
  background-color: #666;
  border-radius: 50%;
  margin: 0 3px;
  animation: wave 1.4s infinite ease-in-out;
}
.wave-loading .dot:nth-child(2) {
  animation-delay: 0.2s;
}
.wave-loading .dot:nth-child(3) {
  animation-delay: 0.4s;
}
/* ==== Video in Chat ==== */
.chatbot-video-container {
  background: #f7f7f7;
  padding: 10px;
  border-radius: 8px;
  margin: 10px 0;
  text-align: center;
}
.chatbot-video-container iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 6px;
}
/* ==== Overlay ==== */
#chatbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#chatbox-overlay.active {
  opacity: 1;
  visibility: visible;
}
/* ==== States ==== */
.chat-open #chatbox-icon { display: none; }
.chat-closed #chatbox-window { display: none; }
/* ==== Limit Message ==== */
.limit-message {
  background-color: #ff7f8a;
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  max-width: 100%;
  align-self: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  animation: fadeIn 0.3s ease;
  margin: 10px 0;
}
/* ==== Alert ==== */
.chat-emergency-alert {
  position: absolute;
  bottom: 10px;
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 10px;
  margin: 10px 15px;
  border-radius: 5px;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 10;
  max-width: calc(100% - 30px);
  align-self: center;
}
.chat-emergency-alert a.emergency-learn-more {
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
}
.chat-emergency-alert a.emergency-learn-more:hover {
  text-decoration: underline;
}
.chat-emergency-alert .emergency-close {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  font-size: 12px;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  padding: 5px 0 3px 1px;
}
.chat-emergency-alert .emergency-close:hover {
  background: #ffeeba;
  color: #664d03;
}
.chat-emergency-alert .emergency-close i {
  font-size: 12px;
}
.chat-emergency-alert .emergency-content {
  display: inline-block;
  text-align: center;
}
/* ==== Image ==== */
.chat-voucher-img {
  width: 100%;
  max-width: 700px;
  display: block;
  margin: 10px auto 20px;
  border-radius: 25px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  object-fit: cover;
}