/* === CHAT WIDGET === */
.chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  border: none;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.chat-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(201, 168, 76, 0.5);
}

.chat-bubble svg {
  width: 28px;
  height: 28px;
  fill: var(--black);
}

.chat-bubble.pulse {
  animation: chatPulse 2s ease-in-out infinite;
}

@keyframes chatPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(201, 168, 76, 0.35); }
  50% { box-shadow: 0 4px 30px rgba(201, 168, 76, 0.7); }
}

.chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  height: 520px;
  max-height: calc(100vh - 140px);
  background: var(--black-light);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  z-index: 199;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--black);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.chat-header-info {
  flex: 1;
  min-width: 0;
}

.chat-header-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header-sub {
  font-size: 0.75rem;
  color: var(--gold);
  margin-top: 1px;
}

.chat-close {
  background: none;
  border: none;
  color: var(--white-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.chat-close:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.chat-fallback-link {
  padding: 8px 16px;
  background: var(--black);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  color: var(--white-muted);
  text-align: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s;
}

.chat-fallback-link:hover {
  color: var(--gold);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

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

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

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.msg-bot {
  align-self: flex-start;
  background: var(--black-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--white);
}

.msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--black);
  font-weight: 500;
}

.msg-loading {
  align-self: flex-start;
  background: var(--black-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--white-muted);
  font-size: 0.85rem;
  padding: 10px 16px;
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white-muted);
  animation: dotBounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-service-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

.chip {
  background: var(--black-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.chip:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.chip.selected {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold);
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: var(--black-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: var(--gold);
}

.chat-input::placeholder {
  color: var(--white-muted);
}

.chat-send {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.chat-send:hover {
  opacity: 0.85;
}

.chat-send svg {
  width: 18px;
  height: 18px;
  fill: var(--black);
}

.chat-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 4px 0 8px;
}

.chat-date-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--white);
}

.chat-date-cell:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.chat-date-cell.selected {
  background: var(--gold);
  color: var(--black);
  font-weight: 700;
}

.chat-date-cell.disabled {
  color: rgba(255, 255, 255, 0.2);
  cursor: default;
}

.chat-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.chat-date-label {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
}

.chat-date-nav {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.chat-date-nav:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.chat-day-hdr {
  text-align: center;
  font-size: 0.65rem;
  color: var(--white-muted);
  padding: 2px 0;
  letter-spacing: 0.05em;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 4px 0;
}

.slot-chip {
  background: var(--black-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  padding: 10px 6px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.slot-chip:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.chat-hidden {
  display: none;
}

/* === RESPONSIVE === */
@media (max-width: 520px) {
  .chat-window {
    bottom: 0;
    right: 0;
    width: 95vw;
    height: 90vh;
    border-radius: var(--radius) var(--radius) 0 0;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
  }

  .chat-bubble {
    bottom: 16px;
    right: 16px;
  }
}
