/* ---------- GLASS CHAT WIDGET STYLES ---------- */
/* Floating launcher */
#chatbox-toggle {
  position: fixed;
  bottom: 20px;
  right: 25px;
  background: rgba(22, 52, 64, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  font-size: 20px;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  text-align: center;
  line-height: 60px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

#chatbox-toggle:hover {
  transform: scale(1.1) rotate(5deg);
  background: rgba(26, 61, 76, 0.8);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.15);
}

div#chatbox-toggle img {
  max-width: 70%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
}

#chatbox-toggle:hover img {
  transform: scale(1.1);
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ff6b6b, #ff4d4d);
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(255, 77, 77, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}

/* Chat widget container - Glass effect */
#chatbox {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: 320px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 20px;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  overflow: hidden;
  font-family: 'Segoe UI', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  z-index: 9998;
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  max-height: -webkit-fill-available !important;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#chatbox[style*="block"] {
  transform: translateY(0);
  opacity: 1;
}

/* Chat header */
#chat-header {
  background: rgba(22, 52, 64, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: #fff;
  padding: 16px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bot-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ff9501, #ffaa33);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Chat messages area - Glass content */
#chat-messages {
  flex: 1;
  overflow-y: auto;
  max-height: 280px;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 14px;
  background: rgba(247, 249, 252, 0.5);
  backdrop-filter: blur(2px);
}

/* Message styling - Glass bubbles */
.message {
  max-width: 85%;
  padding: 14px 16px;
  border-radius: 20px;
  line-height: 1.5;
  position: relative;
  animation: messageAppear 0.4s forwards;
  opacity: 0;
  transform: translateY(10px);
  margin: 8px 0;
  font-size: 14px;
  transition: transform 0.2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

@keyframes messageAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-message {
  background: rgba(255, 149, 1, 0.85);
  backdrop-filter: blur(4px);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.bot-message {
  background: rgba(247, 249, 252, 0.7);
  backdrop-filter: blur(4px);
  color: #2d3748;
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.message:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* Chat options area - Glass panel */
#chat-options {
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  max-height: 250px;
  overflow-y: auto;
  font-size: 14px;
}

#chat-options button {
  flex: 1 1 45%;
  min-width: 120px;
  font-size: 13px;
  padding: 12px 15px;
  border: none;
  border-radius: 12px;
  background: rgba(22, 52, 64, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#chat-options button:hover {
  background: rgba(26, 61, 76, 0.95);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Contact info glass panel */
.contact-info-container {
  padding: 16px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 22px rgba(0,0,0,0.1);
}

/* Scrollbar styling - Glass theme */
#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: rgba(240, 242, 245, 0.3);
  border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: rgba(160, 174, 192, 0.6);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(123, 142, 167, 0.8);
}

/* Link styling - Vibrant accents */
.message-content a {
  color: #25D366 !important;
  font-weight: bold !important;
  text-decoration: none !important;
  pointer-events: auto !important;
  border-bottom: 2px solid rgba(37, 211, 102, 0.3);
  transition: all 0.2s;
}

.message-content a:hover {
  text-decoration: none !important;
  border-bottom: 2px solid #25D366;
  text-shadow: 0 0 8px rgba(37, 211, 102, 0.4);
}

/* Close button - Glass style */
#close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
  border: none;
  font-size: 24px;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  transform: rotate(90deg);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  #chatbox {
    width: 90vw;
    right: 5vw;
    max-height: 65vh;
    bottom: 80px;
  }
  
  #chatbox-toggle {
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    line-height: 55px;
  }
}

/* Typing indicator - Glass theme */
.typing-indicator {
  background: rgba(247, 249, 252, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

/* Contact booking button - Glass with gradient */
.contact-booking a {
  display: inline-block;
  background: linear-gradient(to right, rgba(37, 211, 102, 0.9), rgba(43, 214, 115, 0.9));
  backdrop-filter: blur(4px);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
  text-decoration: none !important;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-booking a:hover {
  background: linear-gradient(to right, rgba(43, 214, 115, 0.95), rgba(49, 224, 125, 0.95));
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

/* Status indicator - Glowing effect */
.bot-status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #4cdf60;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 10px rgba(76, 223, 96, 0.8);
  animation: glow 1.5s infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 5px rgba(76, 223, 96, 0.8); }
  to { box-shadow: 0 0 15px rgba(76, 223, 96, 1); }
}