/* Chat Widget Styles - Neoclassical */
.chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  display: none;
  animation: fadeIn 0.2s ease;
}

.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: "Cormorant Garamond", serif;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(201, 169, 110, 0.4);
  transition: all 0.3s ease;
  position: relative;
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(201, 169, 110, 0.5);
}

.chat-toggle svg {
  width: 28px;
  height: 28px;
  fill: var(--darker);
  transition: transform 0.3s;
}

.chat-toggle.active svg { transform: rotate(90deg); }

.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 520px;
  background: var(--dark);
  border-radius: 4px;
  border: 1px solid var(--border-gold);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(201, 169, 110, 0.05);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.chat-window.open { display: flex; }

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

.chat-window-header {
  padding: 20px;
  background: linear-gradient(135deg, #2a2520, #1e1b17);
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-avatar svg { width: 20px; height: 20px; stroke: var(--darker); }

.chat-info h4 {
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: 1px;
}

.chat-info span { font-size: 0.8rem; opacity: 0.9; }

.chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-messages-container::-webkit-scrollbar { width: 6px; }
.chat-messages-container::-webkit-scrollbar-track { background: transparent; }
.chat-messages-container::-webkit-scrollbar-thumb { background: var(--border-gold); border-radius: 3px; }

.chat-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.6;
  animation: fadeIn 0.3s ease;
}

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

.chat-message.user {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--darker);
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chat-message.bot {
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid var(--border-gold);
  color: var(--light);
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.chat-message.bot.typing {
  display: flex;
  gap: 5px;
  padding: 16px 20px;
}

.chat-message.bot.typing span {
  width: 8px;
  height: 8px;
  background: var(--gray);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
}

.chat-message.bot.typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-message.bot.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.chat-message .timestamp {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-top: 5px;
  display: block;
}

.chat-message a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 700;
  transition: color 0.2s ease;
}

.chat-message a:hover { color: var(--secondary); }

.chat-message.user a {
  color: var(--darker);
  text-decoration: underline;
}

.chat-message.user a:hover { opacity: 0.9; }

.chat-input-container {
  padding: 15px 20px;
  border-top: 1px solid var(--border-gold);
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-gold);
  border-radius: 2px;
  background: var(--darker);
  color: var(--light);
  font-size: 0.95rem;
  font-family: "Cormorant Garamond", serif;
  outline: none;
  transition: border-color 0.3s;
}

.chat-input:focus { border-color: var(--primary); }
.chat-input::placeholder { color: var(--gray); }

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
}

.chat-send:hover { transform: scale(1.05); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-send svg { width: 20px; height: 20px; fill: var(--darker); pointer-events: none; }

/* Welcome message */
.welcome-message {
  text-align: center;
  padding: 20px;
  color: var(--gray);
}

.welcome-message h5 {
  font-family: "Cinzel", serif;
  color: var(--light);
  font-size: 1rem;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.welcome-message p { font-size: 0.9rem; line-height: 1.6; }

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  justify-content: center;
}

.quick-action {
  padding: 8px 14px;
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid var(--border-gold);
  border-radius: 2px;
  color: var(--light);
  font-size: 0.8rem;
  font-family: "Cinzel", serif;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-action:hover {
  background: rgba(201, 169, 110, 0.25);
  border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .chat-widget { bottom: 20px; right: 20px; }
  .chat-window { width: 360px; height: 480px; }
  .chat-toggle { width: 56px; height: 56px; }
  .chat-toggle svg { width: 26px; height: 26px; }
}

@media (max-width: 640px) {
  .chat-widget { bottom: 15px; right: 15px; left: 15px; }
  .chat-toggle { width: 54px; height: 54px; position: fixed; right: 15px; bottom: 10px; left: auto; }
  .chat-window { width: calc(100vw - 30px); height: calc(100vh - 100px); max-height: 600px; bottom: 75px; right: 0; left: 0; margin: 0 auto; }
  .chat-window-header { padding: 16px; }
  .chat-avatar { width: 36px; height: 36px; }
  .chat-info h4 { font-size: 0.9rem; }
  .chat-info span { font-size: 0.75rem; }
  .chat-messages-container { padding: 15px; gap: 12px; }
  .chat-message { font-size: 0.85rem; padding: 10px 14px; max-width: 90%; }
  .chat-message .timestamp { font-size: 0.65rem; }
  .chat-input-container { padding: 12px 15px; }
  .chat-input { font-size: 0.85rem; padding: 10px 14px; }
  .chat-send { width: 40px; height: 40px; }
  .chat-send svg { width: 18px; height: 18px; }
  .welcome-message { padding: 15px; }
  .welcome-message h5 { font-size: 0.95rem; }
  .welcome-message p { font-size: 0.8rem; }
  .quick-actions { gap: 6px; }
  .quick-action { padding: 6px 12px; font-size: 0.75rem; }
}

@media (max-width: 380px) {
  .chat-widget { bottom: 10px; right: 10px; left: 10px; }
  .chat-toggle { width: 50px; height: 50px; right: 10px; }
  .chat-toggle svg { width: 24px; height: 24px; }
  .chat-window { width: calc(100vw - 20px); height: calc(100vh - 90px); max-height: 500px; bottom: 70px; }
  .chat-window-header { padding: 12px; }
  .chat-avatar { width: 32px; height: 32px; }
  .chat-info h4 { font-size: 0.85rem; }
  .chat-info span { font-size: 0.7rem; }
  .chat-messages-container { padding: 12px; }
  .chat-message { font-size: 0.8rem; padding: 8px 12px; }
  .chat-input { font-size: 0.8rem; padding: 8px 12px; }
  .quick-action { font-size: 0.7rem; padding: 5px 10px; }
}

@media (max-width: 768px) and (orientation: landscape) {
  .chat-window { height: calc(100vh - 80px); max-height: 400px; }
  .chat-messages-container { padding: 10px; }
  .welcome-message { padding: 10px; }
  .quick-actions { margin-top: 10px; }
}
