/* C&R Community Service - shared site styles (mirrors the React app's design system) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Outfit:wght@700;800&display=swap');

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: #ffffff;
  color: #0f172a;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
}

.font-display { font-family: 'Outfit', sans-serif; }
.font-serif { font-family: 'Playfair Display', serif; }

.bg-grid-pattern {
  background-image:
    linear-gradient(to right, rgba(26, 54, 93, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 54, 93, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

.clip-diagonal-reverse {
  clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
}

.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin-slow { animation: spin-slow 3s linear infinite; }

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.animate-float { animation: float-y 4s ease-in-out infinite; }

/* ---- Modals (Booking / Privacy / Terms) ---- */
.cr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 54, 93, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.cr-modal-overlay.is-open { opacity: 1; pointer-events: auto; }

.cr-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  z-index: 101;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-height: 88vh;
  overflow-y: auto;
}
.cr-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* ---- Service card image controls (upload / cycle / reset) ---- */
.service-img-wrap { position: relative; overflow: hidden; }
.service-img-controls {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.service-img-wrap:hover .service-img-controls { opacity: 1; }

/* ---- About image cycle overlay ---- */
.about-photo-overlay {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.about-photo:hover .about-photo-overlay { opacity: 1; }

/* ---- Chatbot ---- */
#cr-chat-toggle {
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.5);
}
#cr-chat-window {
  width: min(92vw, 420px);
  height: min(82vh, 600px);
}
.cr-chat-scrollbar::-webkit-scrollbar { width: 6px; }
.cr-chat-scrollbar::-webkit-scrollbar-thumb { background: #334155; border-radius: 999px; }

.cr-chat-bubble { animation: chat-in 0.2s ease; }
@keyframes chat-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.cr-typing-dot { animation: typing-blink 1.2s infinite; }
.cr-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.cr-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

/* Prevent background scroll when a modal is open */
body.cr-modal-locked { overflow: hidden; }
