/* Сайт онлайн-записи */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #7c5cbf;
  --primary-dark: #5e3fa3;
  --accent: #f0ebfa;
  --text: #2d2d2d;
  --muted: #888;
  --border: #ddd;
  --success: #4caf50;
  --error: #e53935;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0,0,0,0.10);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f3ff;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

.card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 480px;
  padding: 28px 24px;
  margin-top: 16px;
}

.logo {
  text-align: center;
  margin-bottom: 24px;
}
.logo h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
}
.logo p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* Шаги */
.step { display: none; }
.step.active { display: block; }

.step-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

/* Прогресс */
.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.progress-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.progress-dot.done { background: var(--primary); }

/* Дата-сетка */
.date-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.date-btn {
  padding: 10px 6px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  text-align: center;
  transition: all 0.2s;
  line-height: 1.3;
}
.date-btn:hover { border-color: var(--primary); background: var(--accent); }
.date-btn.selected { border-color: var(--primary); background: var(--primary); color: var(--white); font-weight: 600; }
.date-btn.day-off { color: var(--muted); background: #f8f8f8; cursor: default; }
.date-btn .day-name { font-size: 11px; opacity: 0.75; display: block; }

/* Длительность */
.dur-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.dur-btn {
  padding: 16px 8px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
}
.dur-btn:hover { border-color: var(--primary); background: var(--accent); }
.dur-btn.selected { border-color: var(--primary); background: var(--primary); color: var(--white); }
.dur-btn span { font-size: 12px; display: block; font-weight: 400; opacity: 0.8; }

/* Специалист-сетка */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.spec-btn {
  padding: 20px 8px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.spec-btn:hover { border-color: var(--primary); background: var(--accent); }
.spec-btn.selected { border-color: var(--primary); background: var(--primary); color: var(--white); }
.spec-btn.spec-any { border-style: dashed; }
.spec-name { font-size: 15px; font-weight: 600; display: block; }

/* Время-сетка */
.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.time-btn {
  padding: 12px 4px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
}
.time-btn:hover { border-color: var(--primary); background: var(--accent); }
.time-btn.selected { border-color: var(--primary); background: var(--primary); color: var(--white); }

/* Форма */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.whatsapp-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  margin-top: 8px; cursor: pointer;
}
.whatsapp-check input { width: 16px; height: 16px; cursor: pointer; }

/* Кнопки */
.btn {
  display: block;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: #bbb; cursor: not-allowed; }
.btn-secondary {
  background: none;
  color: var(--muted);
  font-size: 14px;
  padding: 10px;
}
.btn-back {
  background: none;
  color: var(--primary);
  font-size: 14px;
  padding: 10px;
  border: none;
  cursor: pointer;
  width: auto;
  margin-bottom: 4px;
}

/* Итог */
.summary-box {
  background: var(--accent);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}
.summary-row:last-child { margin-bottom: 0; }
.summary-row .label { color: var(--muted); }
.summary-row .value { font-weight: 600; }

/* Статусы */
.empty-msg {
  text-align: center;
  color: var(--muted);
  padding: 20px 0;
  font-size: 14px;
}
.loading-msg {
  text-align: center;
  color: var(--primary);
  padding: 20px 0;
  font-size: 14px;
}
.error-msg {
  background: #fdecea;
  color: var(--error);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 12px;
}

/* Wishlist link */
.wishlist-link {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--muted);
}
.wishlist-link a { color: var(--primary); text-decoration: none; }

/* Блок доступности */
.avail-block {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px 20px 12px;
  margin-top: 12px;
}
.avail-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
}
.avail-loading {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 8px 0;
}
.avail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f0eeff;
}
.avail-row:last-child { border-bottom: none; }
.avail-date {
  font-size: 13px;
  color: var(--text);
  min-width: 110px;
  flex-shrink: 0;
}
.avail-specs { display: flex; gap: 6px; flex-wrap: wrap; }
.avail-spec {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.avail-yes {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1.5px solid #a5d6a7;
  cursor: pointer;
  transition: all 0.18s;
}
.avail-yes:hover {
  background: #2e7d32;
  color: #fff;
  border-color: #2e7d32;
  transform: scale(1.04);
}
.avail-no {
  background: #f5f5f5;
  color: #bbb;
  border: 1.5px solid #e0e0e0;
  display: inline-block;
}

/* Переключатель языков */
.lang-switcher {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  width: 100%;
  max-width: 480px;
  margin-bottom: 4px;
}
.lang-btn {
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.lang-btn-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 7px 10px;
}
.lang-btn:hover { border-color: var(--primary); transform: scale(1.08); }
.lang-btn.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }

/* Кнопки соцсетей */
.social-bar {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  margin-top: 16px;
}
.social-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.2); }
.social-btn:active { transform: translateY(0); }
.social-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.social-icon svg { width: 26px; height: 26px; }
.social-label { font-size: 12px; font-weight: 700; letter-spacing: 0.3px; }
.social-wa { background: #25D366; color: #fff; }
.social-tg { background: #2AABEE; color: #fff; }
.social-ig { background: linear-gradient(160deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: #fff; }

@media (max-width: 360px) {
  .time-grid { grid-template-columns: repeat(3, 1fr); }
  .date-grid { grid-template-columns: repeat(2, 1fr); }
  .social-label { font-size: 11px; }
}
