/* ============================================
   Dental Prime — booking modal
   Использует дизайн-токены из style.css (:root)
   ============================================ */

/* Modal shell */
.booking-modal {
  position: fixed; inset: 0;
  background: rgba(28, 20, 16, 0.55);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 1000; overflow-y: auto;
  padding: 40px 16px;
  opacity: 0; transition: opacity 0.2s ease;
}
.booking-modal.open { display: flex; opacity: 1; }
.booking-modal-inner {
  position: relative;
  width: 100%; max-width: 520px;
  margin: auto;
  transform: translateY(12px);
  transition: transform 0.25s cubic-bezier(.4, 0, .2, 1);
}
.booking-modal.open .booking-modal-inner { transform: translateY(0); }

.booking-modal-close {
  position: absolute; top: -40px; right: 0;
  width: 32px; height: 32px; border: none; background: none;
  color: var(--white); font-size: 26px; line-height: 1; cursor: pointer;
  font-family: var(--font-body);
}
.booking-modal-close:hover { color: var(--bg-alt); }

/* Booking container — scoped inside modal */
.booking-container {
  font-family: var(--font-body);
  color: var(--text);
}

.booking-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 20px 60px rgba(28, 20, 16, 0.15);
  margin-bottom: 16px;
}
.booking-card h2 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600;
  margin-bottom: 8px; text-align: center;
  line-height: 1.3;
}
.booking-card .card-subtitle {
  text-align: center; font-size: 14px;
  color: var(--text-muted); margin-bottom: 20px;
}

/* Service buttons */
.services { display: flex; flex-direction: column; gap: 10px; }
.service-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--white); cursor: pointer;
  transition: border-color var(--t), background var(--t), transform var(--t);
  font-family: var(--font-body);
  font-size: 15px; font-weight: 500; color: var(--text);
  text-align: left; width: 100%;
}
.service-btn:hover {
  border-color: var(--accent);
  background: var(--bg);
}
.service-btn:active { transform: scale(0.99); }
.service-btn .icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  color: var(--accent);
}
.service-btn .text { flex: 1; }
.service-btn .text .title { display: block; font-weight: 500; line-height: 1.3; }
.service-btn .text .subtitle {
  display: block; font-size: 12.5px;
  color: var(--text-muted); font-weight: 400; margin-top: 3px;
}
.service-btn .arrow {
  color: var(--accent); font-size: 20px;
  font-family: var(--font-body); font-weight: 300;
}

.icon-consult    { background: var(--bg); }
.icon-veneers    { background: var(--bg-alt); }
.icon-whitening  { background: #F7F0E6; }
.icon-implants   { background: var(--bg-deep); }
.icon-restoration { background: #EFE5D4; }

.other-btn {
  display: block; width: 100%; padding: 14px;
  border: 1.5px dashed var(--border); border-radius: var(--radius-md);
  background: transparent; cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px; color: var(--text-muted);
  text-align: center; transition: border-color var(--t), color var(--t);
}
.other-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Screens */
.screen { display: none; }
.screen.active { display: block; }

.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1.5px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px; font-weight: 500; cursor: pointer;
  padding: 12px 20px; border-radius: var(--radius-md);
  margin-bottom: 20px;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.back-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--white); }

/* Doctor cards */
.doctor-list { display: flex; flex-direction: column; gap: 10px; }
.doctor-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--white); cursor: pointer;
  transition: border-color var(--t), background var(--t);
  width: 100%; text-align: left;
  font-family: var(--font-body);
}
.doctor-card:hover { border-color: var(--accent); background: var(--bg); }
.doctor-avatar {
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  overflow: hidden;
  color: var(--accent); font-weight: 600;
  font-family: var(--font-display);
}
.doctor-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.doctor-info { flex: 1; }
.doctor-name { font-size: 15px; font-weight: 500; color: var(--text); }
.doctor-spec { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }

/* Time slots + calendar */
.slots-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.slot-btn {
  padding: 14px 8px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--white); cursor: pointer;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 500; color: var(--text);
  text-align: center; transition: border-color var(--t), background var(--t);
}
.slot-btn:hover { border-color: var(--accent); background: var(--bg); }
.slot-btn.selected {
  border-color: var(--accent); background: var(--accent); color: var(--white);
}

.calendar {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; margin-bottom: 12px;
}
.cal-header {
  text-align: center; font-size: 11px;
  color: var(--text-muted); font-weight: 500;
  padding: 4px 0;
  font-family: var(--font-body);
}
.cal-day {
  text-align: center; padding: 10px 4px;
  border-radius: 8px; font-size: 14px;
  cursor: default; color: #D9CEBF;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
}
.cal-day.available {
  color: var(--text); cursor: pointer;
  background: var(--bg); border-color: var(--border);
}
.cal-day.available:hover { border-color: var(--accent); }
.cal-day.selected {
  background: var(--accent); color: var(--white);
  border-color: var(--accent);
}
.cal-day.today { font-weight: 700; }
.cal-day.past { color: #E8DDC9; }

/* Summary */
.booking-summary { margin-top: 16px; margin-bottom: 16px; }
.booking-summary-row {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.booking-summary-row:last-child { border-bottom: none; }
.booking-summary-label { color: var(--text-muted); }
.booking-summary-value { font-weight: 500; color: var(--text); }

/* Submit */
.submit-btn {
  width: 100%; padding: 16px;
  background: var(--accent); color: var(--white);
  border: none; border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px; font-weight: 500;
  cursor: pointer; transition: background var(--t);
}
.submit-btn:hover { background: var(--accent-hover); }
.submit-btn:disabled { background: #CFC4B3; cursor: not-allowed; }
.submit-btn.secondary {
  margin-top: 16px; background: transparent;
  color: var(--accent); border: 1.5px solid var(--border);
}
.submit-btn.secondary:hover { background: var(--bg); border-color: var(--accent); }

/* Success */
.success-msg { text-align: center; padding: 16px 0; }
.success-msg .check {
  font-size: 40px; margin-bottom: 12px;
  color: var(--accent); font-weight: 300;
}
.success-msg h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600; margin-bottom: 8px;
  color: var(--text);
}
.success-msg p {
  font-size: 14px; color: var(--text-muted); line-height: 1.5;
}

/* Form inputs */
.booking-form-group { margin-bottom: 14px; }
.booking-form-group label {
  display: block; font-size: 13px;
  color: var(--text-muted); margin-bottom: 6px;
}
.booking-form-group input {
  width: 100%; padding: 14px 18px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--white); font-size: 15px; outline: none;
  font-family: var(--font-body); color: var(--text);
  transition: border-color var(--t);
}
.booking-form-group input:focus { border-color: var(--accent); }

/* Messenger choice */
.messenger-choice {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.messenger-btn {
  padding: 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--white); cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px; color: var(--text);
  transition: border-color var(--t), background var(--t), color var(--t);
}
.messenger-btn:hover { border-color: var(--accent); }
.messenger-btn.selected {
  border-color: var(--accent); background: var(--accent); color: var(--white);
}

/* Breadcrumb */
.booking-breadcrumb {
  font-size: 12.5px; color: var(--text-muted);
  margin-bottom: 16px; text-align: center;
  line-height: 1.5;
}
.booking-breadcrumb span { color: var(--accent); font-weight: 500; }

/* Admin help */
.admin-btn {
  display: block; width: 100%; margin-top: 16px;
  padding: 12px; background: none;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-muted); font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer; text-align: center;
  transition: border-color var(--t), color var(--t);
}
.admin-btn:hover { border-color: var(--accent); color: var(--accent); }

.admin-panel {
  display: none; margin-top: 12px; padding: 16px;
  background: var(--bg); border-radius: var(--radius-md);
  text-align: center;
}
.admin-panel.visible { display: block; }
.admin-panel .phone-link {
  display: block; padding: 12px; margin: 6px 0;
  background: var(--white);
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  color: var(--text); text-decoration: none;
  font-size: 15px; font-weight: 500;
  font-family: var(--font-body);
}
.admin-panel .phone-link:hover { border-color: var(--accent); }
.admin-panel p { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }

/* Confirm contact note */
.confirm-contact {
  margin-top: 16px; padding: 16px;
  background: var(--bg); border-radius: var(--radius-md);
  text-align: center;
}
.confirm-contact-title {
  font-size: 14px; font-weight: 500;
  color: var(--text); margin-bottom: 4px;
}
.confirm-contact-sub {
  font-size: 13px; color: var(--text-muted);
}

/* Mobile */
@media (max-width: 560px) {
  .booking-modal { padding: 16px; }
  .booking-card { padding: 24px; border-radius: var(--radius-md); }
  .booking-card h2 { font-size: 20px; }
  .booking-modal-close { top: -36px; font-size: 22px; }
  .slots-grid { grid-template-columns: repeat(3, 1fr); }
  .messenger-choice { grid-template-columns: repeat(2, 1fr); }
}
