/* =========================================
   Med Spa specific styles
   Uses tokens from theme.css
   ========================================= */

/* ── Services Grid ── */
.services-section { padding: 5rem 0; background: var(--bg); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.service-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--fg);
}
.service-desc {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.service-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.service-price {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
}
.service-duration {
  font-size: 0.8rem;
  color: var(--fg-muted);
  background: rgba(255,255,255,0.05);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

/* ── Testimonials ── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.testimonial-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}
.testimonial-stars { color: var(--accent); font-size: 1.1rem; margin-bottom: 0.75rem; }
.testimonial-text { font-size: 0.9rem; color: var(--fg); line-height: 1.7; margin-bottom: 1rem; font-style: italic; }
.testimonial-author { font-size: 0.8rem; color: var(--fg-muted); }

/* ── Hero Accent ── */
.spa-hero .hero-eyebrow { color: var(--accent); }
.btn-primary {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }

/* ── Chat Widget ── */
#chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
#chat-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(245, 158, 11, 0.5); }

#chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  max-height: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#chat-window.open { display: flex; }

.chat-header {
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-header-info { display: flex; align-items: center; gap: 0.75rem; }
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.chat-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.95rem; }
.chat-status { font-size: 0.75rem; color: var(--green); }
.chat-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
  border-radius: 6px;
}
.chat-close:hover { background: rgba(255,255,255,0.08); color: var(--fg); }

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.msg {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: break-word;
}
.msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #000;
  border-bottom-right-radius: 4px;
}
.msg.assistant {
  align-self: flex-start;
  background: rgba(255,255,255,0.07);
  color: var(--fg);
  border-bottom-left-radius: 4px;
}
.msg.typing {
  font-style: italic;
  color: var(--fg-muted);
}

#chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border);
}
.suggestion-btn {
  background: rgba(245,158,11,0.1);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.suggestion-btn:hover { background: rgba(245,158,11,0.2); }

#chat-input-area {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
}
#chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  color: var(--fg);
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
}
#chat-input:focus { border-color: var(--accent-dim); }
#chat-send {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
#chat-send:hover { opacity: 0.85; }

/* Booking panel inside chat */
.booking-panel {
  padding: 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  margin: 0.5rem 0;
}
.booking-panel h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.booking-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.slot-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.4rem 0.3rem;
  border-radius: 7px;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: center;
}
.slot-btn:hover { border-color: var(--accent); color: var(--accent); }
.slot-btn.selected { background: var(--accent); color: #000; border-color: var(--accent); }

/* Mobile Responsive */
@media (max-width: 768px) {
  #chat-window {
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
  }
  .testimonials-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
}