﻿.mobile-chatbar {
  display: none;
}

#open-chat {
  position: fixed;
  bottom: 35px;
  left: 20px;
  background: #00ffcc;
  color: #000;
  border: none;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 0 10px rgba(0, 255, 204, 0.7);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
}

#open-chat img {
  width: 32px;
  height: 32px;
  display: block;
}

#open-chat:hover {
  transform: scale(1.1);
}

#chatbot {
  position: fixed;
  bottom: 50px;
  left: 20px;
  width: 360px;
  height: 480px;
  display: none;
  flex-direction: column;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid #00ffcc;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
  font-family: 'Courier New', monospace;
  color: #00ffcc;
  z-index: 1000;
}

#chat-header {
  padding: 12px;
  border-bottom: 1px solid #00ffcc;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  letter-spacing: 0.5px;
  background: rgba(0,0,0,0.85);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

#chat-header span {
  color: #00ffcc;
}

#chat-header button {
  background: none;
  border: none;
  color: #00ffcc;
  font-size: 18px;
  cursor: pointer;
}

#chat-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
}

.message {
  margin-bottom: 10px;
  word-wrap: break-word;
}

.user {
  color: #ffffff;
  background: rgba(255,255,255,0.05);
  padding: 6px 8px;
  border-radius: 4px;
}

.bot {
  color: #00ffcc;
  background: rgba(0,255,204,0.05);
  padding: 6px 8px;
  border-radius: 4px;
}

.bot .section-title {
  font-weight: bold;
  text-decoration: underline;
  margin-bottom: 4px;
}

.bot .list-item {
  margin-left: 12px;
  margin-bottom: 2px;
}

#chat-input-area {
  border-top: 1px solid #00ffcc;
}

#chat-input {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: none;
  color: #00ffcc;
  outline: none;
  font-family: 'Courier New', monospace;
}

#chat-hint.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  cursor: pointer;
}

#chat-hint {
  position: fixed;
  left: 20px;
  bottom: 100px;
  background: rgba(0,0,0,0.9);
  color: #00ffcc;
  font-family: monospace;
  font-size: 13px;
  padding: 8px 34px 8px 12px;
  border-radius: 6px;
  border: 1px solid #00ffcc;
  box-shadow: 0 0 12px rgba(0,255,204,0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 9999;
}

#chat-hint .hint-close {
  position: absolute;
  top: 6px;
  right: 8px;
  cursor: pointer;
  font-size: 12px;
}

#chat-hint::before {
  content: '';
  position: absolute;
  left: 15px;
  bottom: -8px;
  transform: none;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #00ffcc;
  z-index: 1;
}

#chat-hint::after {
  content: '';
  position: absolute;
  left: 16px;
  bottom: -6px;
  transform: none;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid rgba(0,0,0,0.9);
  z-index: 2;
}

.chat-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chat-btn {
  background: rgba(0, 255, 204, 0.12);
  color: #00ffcc;
  border: 1px solid #00ffcc;
  padding: 6px 12px;
  font-family: monospace;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.chat-btn:hover {
  background: #00ffcc;
  color: #000;
  transform: translateY(-1px);
}

.chat-btn:active {
  transform: scale(0.95);
}

#chatbot {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex;
  pointer-events: none;
}

#chatbot.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 750px) {
  /* Hide the mobile top chatbar overlay */
  .mobile-chatbar {
    display: none;
  }

  /* Move chat button to bottom-left, above the bottom navbar */
  #open-chat {
    position: fixed;
    bottom: 84px;
    left: 10px;
    top: auto;
    right: auto;
    width: 44px;
    height: 44px;
    z-index: 1001;
  }

  #open-chat img {
    width: 26px;
    height: 26px;
  }

  /* Red notification dot on the chat button (instead of hint) */
  #open-chat::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    background: #ff3333;
    border-radius: 50%;
    border: 1.5px solid #0a0e17;
    box-shadow: 0 0 5px rgba(255, 51, 51, 0.7);
    animation: redDotPulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 1002;
  }

  /* Hide the dot once the user has interacted */
  #open-chat.chatted::after {
    display: none;
  }

  @keyframes redDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.7; }
  }

  /* Chatbot panel opens upward, above the bottom navbar */
  #chatbot {
    bottom: 138px;
    top: auto;
    left: 10px;
    width: 320px;
    height: 420px;
    z-index: 1000;
  }

  /* Completely hide the hint on mobile */
  #chat-hint {
    display: none !important;
  }
}

@media (max-width: 400px) {
  #chatbot {
    width: calc(100vw - 20px);
    left: 10px;
    height: 65vh;
  }
}

.short-text, .tiny-text {
  display: none;
}

@media (max-width: 520px) {
  .default-text {
    display: none;
  }
  .short-text {
    display: inline;
  }
}

@media (max-width: 420px) {
  .short-text {
    display: none;
  }
  .tiny-text {
    display: inline;
  }
}
