/* ==========================================================================
   vGallerySpace — RESA Floating Docent Lounge Widget
   Monochrome White / Black / Charcoal Gray
   All-in-One Lounge Experience inside the Pop-Up Window (Natural Conversational Tone)
   ========================================================================== */

#resa-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #000000;
  border: 1.5px solid #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: transform 0.2s ease, background-color 0.2s ease;
  outline: none;
}

#resa-launcher:hover {
  transform: scale(1.08);
  background: #111111;
}

#resa-launcher svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#resa-launcher .icon-close {
  display: none;
}

#resa-launcher.is-open .icon-chat {
  display: none;
}

#resa-launcher.is-open .icon-close {
  display: block;
}

/* Floating Lounge Window */
#resa-widget {
  position: fixed;
  bottom: 88px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 110px);
  background: #ffffff;
  border: 1px solid #111111;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#resa-widget.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header with Docent Portrait */
.resa-w-header {
  background: #000000;
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #222222;
}

.resa-w-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.resa-w-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.resa-w-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resa-w-title-block {
  display: flex;
  flex-direction: column;
}

.resa-w-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0;
  color: #ffffff;
  line-height: 1.2;
}

.resa-w-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-top: 2px;
}

.resa-w-dot {
  width: 5px;
  height: 5px;
  background: #00ff88;
  border-radius: 50%;
}

.resa-w-close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  padding: 0;
  line-height: 1;
}

.resa-w-close-btn:hover {
  opacity: 1;
}

/* Vertical Stacked Topic Buttons Area */
.resa-w-topics {
  background: #f4f4f4;
  border-bottom: 1px solid #111111;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.resa-w-chip {
  background: #ffffff;
  border: 1px solid #111111;
  color: #111111;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
  text-transform: none; /* Natural sentence case */
}

.resa-w-chip:hover {
  background: #111111;
  color: #ffffff;
}

/* Messages Area */
.resa-w-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
}

.resa-w-msg {
  padding: 12px 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 88%;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.resa-w-msg.bot {
  align-self: flex-start;
  background: #f4f4f4;
  border: 1px solid #111111;
  color: #111111;
  text-transform: none; /* Natural sentence case */
}

.resa-w-msg.user {
  align-self: flex-end;
  background: #111111;
  border: 1px solid #111111;
  color: #ffffff;
  font-weight: 600;
  text-transform: none; /* Natural sentence case */
}

/* Footer / Input - Natural Typing Rhythm */
.resa-w-footer {
  padding: 12px 14px;
  background: #fcfcfc;
  border-top: 1px solid #111111;
  display: flex;
  gap: 8px;
}

.resa-w-input {
  flex: 1;
  background: #ffffff;
  border: 1px solid #111111;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 400;
  color: #111111;
  outline: none;
  text-transform: none;
  transition: border-color 0.2s;
}

.resa-w-input::placeholder {
  text-transform: none;
  color: #888888;
}

.resa-w-input:focus {
  border-color: #000000;
  box-shadow: 0 0 0 1px #000000;
}

.resa-w-send {
  background: #111111;
  color: #ffffff;
  border: none;
  padding: 0 16px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.resa-w-send:hover {
  background: #333333;
}
