/* ═══════════════════════════════════════════
   MODAL STYLES — AI INTAKE & BOOK SERVICE
═══════════════════════════════════════════ */

/* ── AI Intake Modal ── */
.modal-ov {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, 0.85);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.modal-ov.on {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  border: 1px solid rgba(0,194,255,0.25);
  box-shadow: 0 40px 100px rgba(0,0,0,0.8), 0 0 0 1px rgba(0,194,255,0.1), var(--glow-blue);
  transform: scale(0.88) translateY(40px);
  transition: transform 0.45s var(--spring);
  position: relative;
  overflow: hidden;
  background: rgba(4,12,26,0.98);
}

.modal-ov.on .modal-box {
  transform: scale(1) translateY(0);
}

/* Animated border */
.modal-box::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(0,194,255,0.4), rgba(0,212,170,0.2), rgba(30,106,255,0.3), rgba(0,194,255,0.1));
  z-index: -1;
  animation: modal-border 4s ease-in-out infinite;
}

@keyframes modal-border {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

.modal-hdr {
  background: linear-gradient(180deg, rgba(30,106,255,0.15) 0%, rgba(0,194,255,0.05) 100%);
  border-bottom: 1px solid var(--glass-border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.modal-hdr::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,194,255,0.08), transparent);
}

.modal-hdr-info {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.modal-av {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e6aff, #00c2ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--glow-blue);
}

.modal-hdr h3 {
  color: white;
  font-size: 1.05rem;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.modal-hdr p {
  color: var(--text-dim);
  font-size: 0.77rem;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  color: var(--text-mid);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* ── Service selector ── */
.svc-selector {
  padding: 14px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.02);
}

.svc-tag {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  border-radius: var(--r-full);
  padding: 5px 13px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.svc-tag:hover {
  border-color: rgba(0,194,255,0.4);
  color: var(--cyan);
}

.svc-tag.picked {
  background: rgba(0,194,255,0.12);
  border-color: rgba(0,194,255,0.4);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(0,194,255,0.2);
}

/* ── Chat area ── */
.modal-chat {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  max-height: 380px;
}

.modal-chat::-webkit-scrollbar {
  width: 3px;
}

.modal-chat::-webkit-scrollbar-thumb {
  background: rgba(0,194,255,0.3);
  border-radius: 2px;
}

.modal-qr {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 24px 0;
}

/* ── Input row ── */
.modal-input-row {
  padding: 14px 24px 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 8px;
}

.m-inp {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-full);
  padding: 10px 16px;
  font-family: var(--font);
  font-size: 0.85rem;
  color: white;
  outline: none;
  transition: all 0.25s;
}

.m-inp::placeholder {
  color: var(--text-dimmer);
}

.m-inp:focus {
  border-color: rgba(0,194,255,0.5);
  background: rgba(0,194,255,0.04);
  box-shadow: 0 0 0 3px rgba(0,194,255,0.1);
}

.m-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #1e6aff, #00c2ff);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: var(--glow-blue);
}

.m-send:hover {
  transform: scale(1.1);
  box-shadow: 0 0 24px rgba(0,194,255,0.7);
}

/* ═══════════════════════════════════════════
   BOOK FORM MODAL
═══════════════════════════════════════════ */

.book-modal-ov {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, 0.85);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.book-modal-ov.on {
  opacity: 1;
  pointer-events: all;
}

.book-modal-box {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--r-xl);
  background: rgba(4, 12, 26, 0.98);
  border: 1px solid rgba(0,194,255,0.25);
  box-shadow: 0 40px 100px rgba(0,0,0,0.8), var(--glow-blue);
  transform: scale(0.88) translateY(40px);
  transition: transform 0.45s var(--spring);
}

.book-modal-ov.on .book-modal-box {
  transform: scale(1) translateY(0);
}

.bm-hdr {
  background: linear-gradient(135deg, rgba(30,106,255,0.2), rgba(0,194,255,0.08));
  border-bottom: 1px solid var(--glass-border);
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.bm-hdr h3 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.bm-hdr p {
  color: var(--text-dim);
  font-size: 0.83rem;
}

.bm-body {
  padding: 28px;
}

/* ── Form fields ── */
.fg {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fg label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fg input,
.fg select,
.fg textarea {
  font-family: var(--font);
  font-size: 0.88rem;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: white;
  outline: none;
  width: 100%;
  transition: all 0.25s;
}

.fg input::placeholder,
.fg textarea::placeholder {
  color: var(--text-dimmer);
}

.fg select option {
  background: #071428;
  color: white;
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  border-color: rgba(0,194,255,0.5);
  background: rgba(0,194,255,0.04);
  box-shadow: 0 0 0 3px rgba(0,194,255,0.1);
}

.fg textarea {
  resize: vertical;
  min-height: 80px;
}

.fr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.ffa {
  grid-column: 1 / -1;
  margin-bottom: 14px;
}
