/* МУРАВЕЙ — экраны мастера (owner: master, docs/CONTRACT.md §7.4): анкета-визард, формы настроек,
   «Мои отзывы», верификация. Палитра и базовые компоненты — app.css / common.css. Все экраны
   получают класс .ms-view (не .master-view: так называется публичная анкета мастера в catalog.css). */

/* ===== Общее ===== */
.ms-view .btn-next.busy::after,
.ms-view .btn-secondary.busy::after {
  content: ''; display: inline-block;
  width: 14px; height: 14px; margin-left: 10px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.7s linear infinite;
}
.ms-settings-lead { margin: 0; font-size: 13px; line-height: 1.5; color: rgba(245, 247, 250, 0.8); }

/* ===== Визард: индикатор шагов из сот ===== */
.ms-wizard-steps { display: flex; align-items: center; margin: 4px 0 20px; padding: 0; list-style: none; }
.ms-wizard-step { display: flex; align-items: center; flex: 1 1 0; min-width: 0; }
.ms-wizard-step:last-child { flex: 0 0 auto; }
.ms-wizard-step::after {
  content: ''; flex: 1; height: 2px; margin: 0 5px;
  background: var(--line-soft); border-radius: 2px;
  transition: background 0.3s;
}
.ms-wizard-step:last-child::after { display: none; }
.ms-wizard-step.done::after { background: var(--yellow); }
.ms-wizard-hex {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 39px;
  background: var(--hex-empty);
  clip-path: var(--hex-clip);
  font-size: 13px; font-weight: 800; color: var(--text-muted);
  transition: background 0.3s, transform 0.3s;
}
.ms-wizard-hex svg { width: 16px !important; height: 16px !important; stroke-width: 3; }
.ms-wizard-step.done .ms-wizard-hex, .ms-wizard-step.current .ms-wizard-hex {
  background: linear-gradient(165deg, #FFDE5A 0%, #F0BB10 100%);
  color: var(--ink);
}
.ms-wizard-step.current .ms-wizard-hex { transform: scale(1.14); }
.ms-wizard-head { margin-bottom: 18px; }
.ms-wizard-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--yellow); }
.ms-wizard-title { margin: 4px 0 6px; font-size: 24px; font-weight: 900; line-height: 1.15; letter-spacing: -0.01em; color: #fff; }
.ms-wizard-lead { margin: 0; font-size: 13px; line-height: 1.5; color: rgba(245, 247, 250, 0.8); }
.ms-wizard-panels > .form { animation: fadeUp 0.25s ease-out; }
.ms-wizard-panels + .btn-row { margin-top: 6px; }
.ms-wizard-skip { margin-top: 10px; text-align: center; }

/* ===== Выбор услуг ===== */
.ms-service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ms-service-grid.invalid { border-radius: 16px; outline: 1.5px solid var(--danger); outline-offset: 4px; }
.ms-service-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 0; padding: 12px 4px 10px;
  background: var(--panel-soft);
  border: 1.5px solid var(--line-soft); border-radius: 14px;
  font-family: inherit; font-size: 12px; font-weight: 700; color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.ms-service-tile:hover { border-color: rgba(255, 214, 64, 0.4); }
.ms-service-tile:active { transform: scale(0.97); }
.ms-service-hex {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 60px;
  background: var(--hex-empty);
  clip-path: var(--hex-clip);
  transition: background 0.2s;
}
.ms-service-hex svg { width: 22px !important; height: 22px !important; color: var(--yellow); transition: color 0.2s; }
.ms-service-name { display: flex; align-items: center; min-height: 2.4em; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.ms-service-tile.selected { background: rgba(255, 214, 64, 0.1); border-color: var(--yellow); }
.ms-service-tile.selected .ms-service-hex { background: linear-gradient(165deg, #FFDE5A 0%, #F0BB10 100%); }
.ms-service-tile.selected .ms-service-hex svg { color: var(--ink); }

/* ===== Цены ===== */
.ms-price-table { display: flex; flex-direction: column; gap: 8px; }
.ms-price-row {
  padding: 10px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft); border-radius: 12px;
}
.ms-price-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ms-price-service { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; font-weight: 700; }
.ms-price-service span { min-width: 0; overflow-wrap: anywhere; }
.ms-price-service svg { flex-shrink: 0; width: 18px !important; height: 18px !important; color: var(--yellow); }
.ms-price-input { position: relative; flex: 0 0 148px; }
.ms-price-input .input { padding: 10px 30px 10px 34px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ms-price-prefix, .ms-price-suffix {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  pointer-events: none;
}
.ms-price-prefix { left: 12px; }
.ms-price-suffix { right: 12px; }

/* ===== Город ===== */
.ms-city-tail { display: flex; align-items: center; gap: 6px; }
/* Как в шторке городов: у выбранного только галочка, у остальных только «ТОП». Колонки 1fr сами
   не сжимаются меньше содержимого и на 320–360 px вылезали за экран. */
.ms-view .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-view .city-option > span:first-child { min-width: 0; }
.ms-view .city-option:not(.active) .check { display: none; }
.ms-view .city-option.active .popular { display: none; }

/* ===== График ===== */
.ms-schedule-editor { display: flex; flex-direction: column; gap: 14px; }
.ms-schedule-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-schedule-presets .chip { flex-shrink: 1; }
.ms-schedule-days { display: flex; flex-direction: column; gap: 8px; }
.ms-schedule-day {
  position: relative;
  padding: 10px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft); border-radius: 12px;
}
.ms-schedule-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ms-schedule-name { flex: 0 0 24px; font-size: 14px; font-weight: 800; color: var(--yellow); }
.ms-schedule-switch { position: relative; flex-shrink: 0; display: flex; cursor: pointer; }
.ms-schedule-times { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.ms-schedule-times .input { flex: 1; min-width: 0; padding: 9px 8px; font-size: 14px; text-align: center; }
.ms-schedule-dash { color: var(--text-muted); }
.ms-schedule-off { font-size: 13px; font-weight: 600; color: var(--text-muted); }

/* ===== Мои отзывы ===== */
.ms-reviews-summary { display: flex; align-items: center; gap: 16px; }
.ms-reviews-score { font-size: 44px; font-weight: 900; line-height: 1; color: var(--yellow); font-variant-numeric: tabular-nums; }
.ms-reviews-meta { display: flex; flex-direction: column; gap: 6px; }
.ms-reviews-count { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.ms-review-list { margin-top: 16px; }
.ms-review-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.ms-review-author { min-width: 0; font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.ms-review-date { flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.ms-review-text { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: rgba(245, 247, 250, 0.9); overflow-wrap: anywhere; white-space: pre-line; }
.ms-review-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ms-review-photo {
  width: 64px; height: 64px; padding: 0;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft); border-radius: 10px;
  overflow: hidden; cursor: pointer;
}
.ms-review-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ms-review-foot { margin-top: 10px; }
.ms-lightbox-modal .modal-body { padding: 0 12px 12px; }
.ms-lightbox-img { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: rgba(0, 0, 0, 0.25); border-radius: 12px; }
.ms-lightbox-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.ms-lightbox-nav .btn-secondary { display: flex; align-items: center; }
.ms-lightbox-nav svg { width: 16px !important; height: 16px !important; }
.ms-lightbox-count { font-size: 12px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ===== Верификация ===== */
.ms-verify-hero { display: flex; align-items: center; gap: 14px; }
.ms-verify-hex {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 60px;
  background: var(--hex-empty);
  clip-path: var(--hex-clip);
}
.ms-verify-hex svg { width: 24px !important; height: 24px !important; color: var(--yellow); }
.ms-verify-hero.pending .ms-verify-hex { background: linear-gradient(165deg, #FFDE5A 0%, #F0BB10 100%); }
.ms-verify-hero.pending .ms-verify-hex svg { color: var(--ink); }
.ms-verify-hero.verified .ms-verify-hex { background: linear-gradient(165deg, #86EFAC 0%, #4ADE80 100%); }
.ms-verify-hero.verified .ms-verify-hex svg { color: var(--ink); }
.ms-verify-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.ms-verify-title { margin-top: 2px; font-size: 20px; font-weight: 900; color: #fff; }
.ms-verify-steps { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ms-verify-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft); border-radius: 14px;
}
.ms-verify-step.current { background: rgba(255, 214, 64, 0.07); border-color: rgba(255, 214, 64, 0.5); }
.ms-verify-step .badge { flex: 0 0 104px; justify-content: center; margin-top: 1px; }
.ms-verify-step p { flex: 1; min-width: 0; margin: 0; font-size: 12px; line-height: 1.45; color: rgba(245, 247, 250, 0.8); }
.ms-doc-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ms-doc-list:empty { display: none; }
.ms-doc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft); border-radius: 12px;
}
.ms-doc-item > svg { flex-shrink: 0; width: 18px !important; height: 18px !important; color: var(--yellow); }
.ms-doc-name { flex: 1; min-width: 0; overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ms-doc-size { flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.ms-doc-remove { position: static; flex-shrink: 0; }
.ms-doc-add { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ms-doc-add svg { width: 18px !important; height: 18px !important; }

@media (max-width: 360px) {
  .ms-service-grid { gap: 6px; }
  .ms-service-hex { width: 46px; height: 53px; }
  .ms-schedule-day { padding: 8px 10px; }
  .ms-schedule-line { gap: 8px; }
  .ms-schedule-times .input { padding: 9px 4px; }
  .ms-price-input { flex-basis: 132px; }
  .ms-verify-step .badge { flex-basis: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .ms-wizard-panels > .form, .ms-view .btn-next.busy::after, .ms-view .btn-secondary.busy::after { animation: none; }
}
