/* ===========================
   CHATBOT WIDGET - CSS
   =========================== */

/* Material Icons */
.material-icons {
  font-family: "Material Icons";
  font-weight: normal;
  font-style: normal;
  font-size: inherit;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
}

.chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Toggle Button */
.chatbot-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1001;
  color: var(--black-brown);
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(201, 169, 110, 0.35);
  background: var(--gold-pale);
}

.chatbot-toggle:active {
  transform: scale(0.95);
}

.chatbot-toggle.active {
  background: var(--brown-mid);
  color: var(--gold-pale);
  box-shadow: 0 6px 24px rgba(201, 169, 110, 0.2);
}

/* Container */
.chatbot-container {
  position: absolute;
  bottom: 80px;
  right: 0;
  z-index: 1000;
}

/* Window */
.chatbot-window {
  width: 400px;
  height: 600px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  overflow: hidden;
}

.chatbot-window.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Header */
.chatbot-header {
  background: linear-gradient(135deg, var(--luxury-brown) 0%, var(--luxury-dark-gold) 100%);
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-shrink: 0;
  border-radius: 16px 16px 0 0;
}

.chatbot-header-content {
  flex: 1;
}

.chatbot-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--luxury-light-gold);
}

.chatbot-subtitle {
  margin: 0.35rem 0 0 0;
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 400;
}

.chatbot-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chatbot-close:hover {
  transform: rotate(90deg) scale(1.15);
}

.chatbot-close:active {
  transform: rotate(90deg) scale(0.9);
}

/* Messages Area */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.2rem;
  background: #f5f0ea;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chatbot-messages::-webkit-scrollbar {
  width: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #c9a96e;
  border-radius: 2px;
}

/* Messages */
.chatbot-message {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  margin-bottom: 0.4rem;
  animation: chatSlideIn 0.35s ease-out;
}

@keyframes chatSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chatbot-message--user {
  justify-content: flex-end;
}

.chatbot-message--bot {
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

/* Bulles */
.chatbot-bubble {
  max-width: 78%;
  padding: 0.8rem 1rem;
  word-wrap: break-word;
  word-break: break-word;
  line-height: 1.5;
  font-size: 0.9rem;
  letter-spacing: 0.15px;
  font-family: "Gill Sans", "Gill Sans MT", Optima, Arial, sans-serif;
}

.chatbot-message--user .chatbot-bubble {
  background: #c9a96e;
  color: #fafaf8;
  border-radius: 16px 4px 16px 16px;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(201, 169, 110, 0.4);
}

.chatbot-message--bot .chatbot-bubble {
  background: #ffffff;
  color: #3d2b1f;
  border-left: 3px solid #c9a96e;
  border-radius: 0 10px 10px 10px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

/* FAQ Options */
.chatbot-faq-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 0.4rem;
}

.chatbot-faq-btn {
  display: block !important;
  width: 100% !important;
  background: #fafaf8 !important;
  border: none !important;
  border-left: 3px solid #c9a96e !important;
  padding: 0.8rem 1rem !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  text-align: left !important;
  font-size: 0.88rem !important;
  line-height: 1.4 !important;
  transition:
    background 0.2s ease,
    padding-left 0.2s ease !important;
  color: #3d2b1f !important;
  font-family: "Gill Sans", "Gill Sans MT", Optima, Arial, sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: 0.2px !important;
  box-sizing: border-box !important;
}

.chatbot-faq-btn:hover {
  background: #f5f0ea !important;
  border-left-color: #8b6f47 !important;
  padding-left: 1.4rem !important;
}

.chatbot-faq-btn:active {
  background: #ede8e1 !important;
}

/* Input Area */
.chatbot-input-area {
  padding: 1rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 0.6rem;
  background: white;
  flex-shrink: 0;
  border-radius: 0 0 16px 16px;
}

.chatbot-input {
  flex: 1;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: #fafaf8;
}

.chatbot-input:focus {
  outline: none;
  border-color: var(--luxury-gold);
  background: white;
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.12);
}

.chatbot-input::placeholder {
  color: #aaa;
}

.chatbot-send-btn {
  background: linear-gradient(135deg, var(--luxury-gold) 0%, var(--luxury-dark-gold) 100%);
  border: none;
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.chatbot-send-btn:hover {
  background: linear-gradient(135deg, var(--luxury-dark-gold) 0%, var(--luxury-brown) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.chatbot-send-btn:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
  .chatbot-widget {
    bottom: 10px;
    right: 10px;
  }

  .chatbot-toggle {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  .chatbot-window {
    width: calc(100vw - 20px);
    height: calc(100vh - 80px);
    max-width: 100%;
    max-height: 100%;
  }

  .chatbot-container {
    bottom: 70px;
  }

  .chatbot-bubble {
    max-width: 85%;
  }
}

@media (max-width: 320px) {
  .chatbot-window {
    width: calc(100vw - 10px);
    height: calc(100vh - 70px);
  }

  .chatbot-title {
    font-size: 1.1rem;
  }

  .chatbot-bubble {
    font-size: 0.85rem;
    padding: 0.7rem 0.9rem;
  }
}
