/* SAITECH Chatbot Styles - Gold/Cinematic Version */

/* Chatbot Toggle Button */
.chatbot-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, #000000 0%, #3a3a3a 50%, #1a1a1a 100%);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(194, 164, 107, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.1);
  z-index: 9999;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid rgba(194, 164, 107, 0.4);
}

.chatbot-toggle:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(194, 164, 107, 0.5),
    inset 0 0 30px rgba(194, 164, 107, 0.2);
}

.chatbot-toggle i {
  color: #c2a46b;
  font-size: 26px;
  text-shadow: 0 0 15px rgba(194, 164, 107, 0.5);
  transition: all 0.3s ease;
}

.chatbot-toggle .fa-times {
  display: none;
}

.chatbot-toggle.active .fa-comments {
  display: none;
}

.chatbot-toggle.active .fa-times {
  display: block;
}

/* Chatbot Window - Cinematic Glass Effect */
.chatbot-window {
  position: fixed;
  bottom: 110px;
  right: 30px;
  width: 400px;
  max-width: calc(100vw - 60px);
  height: 550px;
  max-height: calc(100vh - 140px);
  background: linear-gradient(
    145deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(58, 58, 58, 0.95) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.6),
    0 0 100px rgba(194, 164, 107, 0.15),
    inset 0 1px 0 rgba(194, 164, 107, 0.1),
    inset 0 0 100px rgba(194, 164, 107, 0.05);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px) scale(0.9) rotateX(10deg);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(194, 164, 107, 0.3);
}

.chatbot-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1) rotateX(0);
}

/* Chatbot Header - Dramatic Gold Gradient */
.chatbot-header {
  background: linear-gradient(135deg, #000000 0%, #3a3a3a 50%, #1a1a1a 100%);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.chatbot-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(194, 164, 107, 0.15),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

/* Chatbot Avatar - Gold Theme */
.chatbot-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #c2a46b 0%, #b39357 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 20px rgba(194, 164, 107, 0.5),
    inset 0 0 20px rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.chatbot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chatbot-avatar i {
  color: #000000;
  font-size: 22px;
}

.chatbot-header-info h3 {
  color: #c2a46b;
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 10px rgba(194, 164, 107, 0.5);
}

.chatbot-header-info p {
  color: rgba(212, 185, 122, 0.7);
  font-size: 12px;
  margin: 4px 0 0 0;
  font-weight: 400;
}

/* Online Status - Gold Glow */
.chatbot-status {
  width: 12px;
  height: 12px;
  background: #04ff00;
  border-radius: 50%;
  margin-left: auto;
  box-shadow:
    0 0 15px #c2a46b,
    0 0 30px rgba(194, 164, 107, 0.5);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 1;
    box-shadow:
      0 0 15px #c2a46b,
      0 0 30px rgba(194, 164, 107, 0.5);
  }
  50% {
    opacity: 0.7;
    box-shadow:
      0 0 25px #c2a46b,
      0 0 50px rgba(194, 164, 107, 0.8);
  }
}

/* Chatbot Messages */
.chatbot-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(194, 164, 107, 0.02) 100%
  );
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: rgba(58, 58, 58, 0.5);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c2a46b, #b39357);
  border-radius: 3px;
}

/* Message Styles */
.message {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: message-fade-in 0.4s ease forwards;
}

@keyframes message-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.bot {
  align-self: flex-start;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* Message Avatars */
.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.message.bot .message-avatar {
  background: linear-gradient(135deg, #c2a46b 0%, #b39357 100%);
  box-shadow: 0 4px 15px rgba(194, 164, 107, 0.4);
}

.message.user .message-avatar {
  background: linear-gradient(135deg, #6a6a6a 0%, #3a3a3a 100%);
  box-shadow: 0 4px 15px rgba(106, 106, 106, 0.4);
}

.message-avatar i {
  color: #fff;
  font-size: 14px;
}

/* Message Content Bubbles */
.message-content {
  padding: 14px 18px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
}

.message.bot .message-content {
  background: linear-gradient(
    135deg,
    rgba(58, 58, 58, 0.9) 0%,
    rgba(26, 26, 26, 0.9) 100%
  );
  color: #e0e0e0;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(194, 164, 107, 0.2);
}

.message.user .message-content {
  background: linear-gradient(135deg, #c2a46b 0%, #b39357 100%);
  color: #000000;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 20px rgba(194, 164, 107, 0.3);
}

.message-content a {
  color: #d4b97a;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.message-content a:hover {
  color: #c2a46b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Quick Reply Buttons - Gold Theme */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.quick-reply-btn {
  padding: 10px 18px;
  background: linear-gradient(
    135deg,
    rgba(194, 164, 107, 0.2) 0%,
    rgba(179, 147, 87, 0.2) 100%
  );
  border: 1px solid rgba(194, 164, 107, 0.5);
  border-radius: 25px;
  font-size: 13px;
  color: #d4b97a;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-weight: 500;
}

.quick-reply-btn:hover {
  background: linear-gradient(135deg, #c2a46b 0%, #b39357 100%);
  color: #000000;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(194, 164, 107, 0.4);
}

/* Chatbot Input - Cinematic */
.chatbot-input {
  padding: 20px 24px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(58, 58, 58, 0.95) 100%
  );
  border-top: 1px solid rgba(194, 164, 107, 0.3);
  display: flex;
  gap: 12px;
}

.chatbot-input input {
  flex: 1;
  padding: 14px 20px;
  background: rgba(58, 58, 58, 0.5);
  border: 1px solid rgba(194, 164, 107, 0.3);
  border-radius: 30px;
  font-size: 14px;
  color: #ffffff;
  outline: none;
  transition: all 0.3s ease;
}

.chatbot-input input::placeholder {
  color: rgba(194, 164, 107, 0.5);
}

.chatbot-input input:focus {
  border-color: rgba(194, 164, 107, 0.8);
  background: rgba(58, 58, 58, 0.7);
  box-shadow: 0 0 20px rgba(194, 164, 107, 0.2);
}

.chatbot-input button {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #c2a46b 0%, #b39357 100%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(194, 164, 107, 0.4);
}

.chatbot-input button:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(194, 164, 107, 0.6);
}

.chatbot-input button i {
  color: #000000;
  font-size: 16px;
}

/* Typing Indicator - Gold */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 14px 18px;
  background: linear-gradient(
    135deg,
    rgba(58, 58, 58, 0.9) 0%,
    rgba(26, 26, 26, 0.9) 100%
  );
  border-radius: 20px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  border: 1px solid rgba(194, 164, 107, 0.2);
}

.typing-indicator span {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #d4b97a 0%, #c2a46b 100%);
  border-radius: 50%;
  animation: typing 1.4s infinite;
  box-shadow: 0 0 10px rgba(194, 164, 107, 0.5);
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .chatbot-toggle {
    bottom: 20px;
    right: 20px;
    width: 58px;
    height: 58px;
  }

  .chatbot-toggle i {
    font-size: 24px;
  }

  .chatbot-window {
    bottom: 95px;
    right: 10px;
    left: 10px;
    width: auto;
    height: calc(100vh - 130px);
    max-height: none;
    border-radius: 20px;
  }

  .chatbot-header {
    padding: 16px 20px;
  }

  .chatbot-messages {
    padding: 16px;
  }

  .chatbot-input {
    padding: 16px;
  }
}

/* Additional Cinematic Effects */
.message.bot .message-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(194, 164, 107, 0.3),
    transparent
  );
}

.quick-reply-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.5s ease;
}

.quick-reply-btn:hover::before {
  left: 100%;
}
