/* ═══════════════════════════════════════════
   SYLQ BOOKING SYSTEM
   Floating "Book a Meeting" button + slide-in panel
   ═══════════════════════════════════════════ */

/* ─── FLOATING BUTTON ─── */
.book-fab {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 1500;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px 0 0 10px;
  padding: 1.1rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  box-shadow: -4px 4px 20px rgba(45, 106, 79, 0.35);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: 'Jost', sans-serif;
}
.book-fab span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
}
.book-fab:hover {
  padding-right: 1.25rem;
  box-shadow: -6px 6px 28px rgba(45, 106, 79, 0.45);
}

/* ─── OVERLAY ─── */
.book-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 13, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1501;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s;
}
.book-panel-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ─── SLIDE-IN PANEL ─── */
.book-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: var(--bg);
  z-index: 1502;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
}
.book-panel.open {
  transform: translateX(0);
}

.book-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.book-panel-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--text);
  margin: 0;
}
.book-panel-header h3 em {
  color: var(--accent);
  font-style: italic;
}
.book-panel-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-soft);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.book-panel-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.book-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.75rem 2rem;
}
.book-panel-sub {
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: -0.25rem 0 1.25rem;
}

.book-view {
  display: none;
}
.book-view.active {
  display: block;
  animation: bookFadeIn 0.3s ease forwards;
}
@keyframes bookFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── FIELDS ─── */
.book-field {
  margin-bottom: 1.1rem;
}
.book-field label {
  display: block;
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 0.4rem;
}
.book-field input,
.book-field select,
.book-field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--text);
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.book-field input:focus,
.book-field select:focus,
.book-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}
.book-field textarea {
  min-height: 70px;
  resize: vertical;
}
.book-field select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B5744' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}

/* ─── 7-DAY CALENDAR ─── */
.book-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.book-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.15rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-2);
}
.book-day-dow {
  font-family: 'Jost', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.book-day-num {
  font-family: 'Jost', sans-serif;
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 400;
}
.book-day:hover:not(.disabled) {
  border-color: var(--accent);
  background: var(--glow);
}
.book-day.selected {
  background: var(--accent);
  border-color: var(--accent);
}
.book-day.selected .book-day-dow,
.book-day.selected .book-day-num {
  color: #fff;
}
.book-day.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ─── TIME SLOTS ─── */
.book-times {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.book-time {
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-2);
}
.book-time:hover {
  border-color: var(--accent);
  background: var(--glow);
}
.book-time.selected {
  background: #C9A84C;
  color: #0F0F0D;
  border-color: #C9A84C;
  font-weight: 500;
}

/* ─── ERROR / SUBMIT ─── */
.book-error {
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  color: #e05252;
  margin: 0.5rem 0;
  min-height: 1.1em;
}
.book-submit-btn {
  width: 100%;
  padding: 0.9rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 0.5rem;
}
.book-submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.book-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ─── SUCCESS VIEW ─── */
#bookSuccessView {
  text-align: center;
}
.book-success-check {
  width: 64px;
  height: 64px;
  margin: 1rem auto 1rem;
}
.book-success-check circle {
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
}
.book-success-check path {
  stroke: var(--accent);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: bookCheckDraw 0.6s 0.2s ease forwards;
}
@keyframes bookCheckDraw {
  to { stroke-dashoffset: 0; }
}
#bookSuccessView h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.book-ref {
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.book-summary {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  text-align: left;
  margin-bottom: 1.25rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
}
.book-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 0.5px solid var(--border);
}
.book-summary-row:last-child {
  border-bottom: none;
}
.book-summary-row span:first-child {
  color: var(--text-soft);
}
.book-success-note {
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.6;
  background: var(--glow);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  margin-bottom: 1.25rem;
}
.book-done-btn {
  width: 100%;
  padding: 0.8rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s;
}
.book-done-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .book-panel {
    width: 100%;
    max-width: 100%;
  }
  .book-fab {
    /* Bottom-left on mobile: bottom-right is already occupied by the
       chat widget bubble + back-to-top button stack. */
    padding: 0.9rem;
    border-radius: 50%;
    top: auto;
    bottom: 1.5rem;
    left: 1.25rem;
    right: auto;
    transform: none;
  }
  .book-fab span {
    display: none;
  }
  .book-fab:hover {
    padding: 0.9rem;
  }
  .book-days {
    gap: 0.25rem;
  }
  .book-day {
    padding: 0.45rem 0.1rem;
  }
  .book-day-num {
    font-size: 0.8rem;
  }
}
