/* МУРАВЕЙ — экраны каталога: услуга, поиск, профиль мастера (owner: catalog, docs/CONTRACT.md §7.4).
   Общие классы (.chip, .masters-list, .master-row, .btn-next, .btn-secondary, .badge, .info-block, .section-title)
   берутся из app.css и common.css; здесь только то, чего там нет. Все стили профиля мастера с префиксом .mp-,
   списков — .catalog-: классы других экранов (.contact-*, .lightbox-*, .schedule-* …) в этом файле не трогаем.
   Класс -> разметка:
     .catalog-chips  ряд фильтров: <button class="chip">…</button> и справа <div class="catalog-sort">чипсы сортировки</div>
     .catalog-list   контейнер списка мастеров (.is-loading — прошлые результаты приглушены на время запроса)
     .mp-menu        соты-кнопки профиля: .mp-tab-left (4 шт.) | .mp-tab-right (высокая сота) | .mp-tab-bottom
     .mp-panel       раскрытый раздел профиля под сотами */

/* ===== Фильтры и список (услуга, поиск) ===== */
.catalog-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin: 0 0 12px; }
.catalog-chips .chip { display: inline-flex; align-items: center; gap: 6px; }
.catalog-chips .chip svg { width: 13px !important; height: 13px !important; }
.catalog-chips .chip:not(.active) svg { color: var(--yellow); }
.catalog-chips .chip .chev { opacity: 0.75; margin-left: -2px; }
.catalog-sort { display: flex; gap: 6px; margin-left: auto; }

.search-view .search-wrap { max-width: 100%; margin: 0 0 12px; }
/* Room around the chips for their glow, which the scroll container would otherwise clip. */
.search-view .search-filters { margin: -4px -16px 4px; padding: 4px 16px 14px; }
.catalog-list .empty-cta { padding: 13px 20px; letter-spacing: 0.06em; }

.catalog-list { transition: opacity 0.15s; }
.catalog-list.is-loading { opacity: 0.45; pointer-events: none; }
.catalog-list .loading { min-height: 140px; }

.catalog-call { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; }
.catalog-call .btn-next {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 0; padding: 17px 15px;
  font-size: 14px;
}
.catalog-call .btn-next svg { flex-shrink: 0; width: 20px !important; height: 20px !important; }
.catalog-call-note { text-align: center; font-size: 11px; line-height: 1.4; color: var(--text-muted); }

/* ===== Профиль мастера: шапка ===== */
.mp-alert {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 0 0 16px; padding: 14px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 14px;
}
.mp-alert-icon {
  flex-shrink: 0; width: 34px; height: 39px;
  display: flex; align-items: center; justify-content: center;
  background: var(--danger);
  clip-path: var(--hex-clip);
}
.mp-alert-icon svg { width: 16px !important; height: 16px !important; color: var(--ink); }
.mp-alert-title { margin-bottom: 2px; font-size: 13px; font-weight: 800; color: var(--danger); }
.mp-alert-text { font-size: 12px; line-height: 1.45; color: rgba(245, 247, 250, 0.85); }

.mp-hero {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 4px 0 20px; text-align: center;
}
.mp-avatar {
  display: inline-flex; margin-bottom: 6px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 22px rgba(255, 214, 64, 0.28));
}
.mp-name {
  margin: 0; max-width: 100%;
  font-size: 24px; font-weight: 900; line-height: 1.15; letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.mp-profession { font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--yellow); }
.mp-rating { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin-top: 4px; }
.mp-rating .rating-num { margin-left: 0; font-size: 15px; }
.mp-rating .rating-count { font-size: 12px; }
.mp-hero .meta-row { justify-content: center; gap: 6px 12px; margin-top: 0; font-size: 12px; }
.mp-hero .meta-item svg { width: 12px !important; height: 12px !important; }
.mp-bio {
  max-width: 460px; margin: 8px 0 0;
  font-size: 13px; line-height: 1.5; color: rgba(245, 247, 250, 0.85);
  white-space: pre-line; overflow-wrap: anywhere;
}
.mp-bio.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== Профиль мастера: соты-кнопки ===== */
.mp-menu {
  --tab-h: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-rows: repeat(5, var(--tab-h));
  gap: 8px 12px;
}
.mp-tab {
  --tab-clip: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%);
  position: relative; isolation: isolate;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 0; padding: 0 20px;
  background: rgba(255, 214, 64, 0.4); border: none;
  clip-path: var(--tab-clip);
  font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; line-height: 1.15; text-transform: uppercase; text-align: center;
  color: var(--text); cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.mp-tab::before {
  content: ''; position: absolute; inset: 1.5px; z-index: -1;
  background: linear-gradient(180deg, #14294A 0%, #0D1F3A 100%);
  clip-path: var(--tab-clip);
  transition: inset 0.15s;
}
.mp-tab:hover { background: rgba(255, 214, 64, 0.75); }
.mp-tab:active { transform: scale(0.97); }
.mp-tab:focus-visible { outline: none; background: var(--yellow); }
.mp-tab:focus-visible::before { inset: 3px; }
.mp-tab[aria-expanded="true"] { background: linear-gradient(165deg, #FFDE5A 0%, #FFD640 35%, #F0BB10 100%); color: var(--ink); }
.mp-tab[aria-expanded="true"]::before { background: transparent; }
.mp-tab svg { flex-shrink: 0; width: 15px !important; height: 15px !important; color: var(--yellow); }
.mp-tab[aria-expanded="true"] svg { color: var(--ink); }
.mp-tab-count { font-size: 10px; font-weight: 800; letter-spacing: 0; opacity: 0.75; }

.mp-tab-left { grid-column: 1; }
.mp-tab-right {
  --tab-clip: polygon(50% 0, 100% 14%, 100% 86%, 50% 100%, 0 86%, 0 14%);
  grid-column: 2; grid-row: 1 / span 4;
  flex-direction: column; gap: 8px; padding: 0 14px;
}
.mp-tab-right svg { width: 28px !important; height: 28px !important; }
.mp-tab-sub { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: none; opacity: 0.75; }
.mp-tab-bottom {
  --tab-clip: polygon(28px 0, calc(100% - 28px) 0, 100% 50%, calc(100% - 28px) 100%, 28px 100%, 0 50%);
  grid-column: 1 / -1; grid-row: 5;
}

.mp-panel {
  margin-top: 14px; padding: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  animation: fadeUp 0.25s ease-out;
}
.mp-panel .section-title { margin: 0 4px 12px; }
.mp-empty { margin: 0; padding: 8px 0; text-align: center; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.mp-panel .btn-secondary { margin-top: 14px; }
.mp-panel .btn-secondary.busy { position: relative; }
.mp-panel .btn-secondary.busy::after {
  content: ''; display: inline-block; vertical-align: -2px; margin-left: 8px;
  width: 13px; height: 13px;
  border: 2px solid rgba(255, 214, 64, 0.3); border-top-color: var(--yellow); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Отзывы и фото */
.mp-review-list { display: flex; flex-direction: column; gap: 12px; }
.mp-review { padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.mp-review:last-child { padding-bottom: 0; border-bottom: none; }
.mp-review-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.mp-review-name { font-size: 13px; font-weight: 800; }
.mp-review-date { margin-left: 8px; font-size: 11px; color: var(--text-muted); }
.mp-review-text {
  margin: 6px 0 0;
  font-size: 13px; line-height: 1.5; color: rgba(245, 247, 250, 0.88);
  white-space: pre-line; overflow-wrap: anywhere;
}
.mp-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.mp-panel .section-title + .mp-thumbs { margin-top: 0; }
.mp-thumb {
  aspect-ratio: 1; padding: 0; overflow: hidden;
  background: var(--panel-soft); border: 1px solid var(--line-soft); border-radius: 12px;
  cursor: zoom-in; transition: border-color 0.2s;
}
.mp-thumb:hover { border-color: rgba(255, 214, 64, 0.5); }
.mp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.mp-lightbox-modal .modal-body { padding: 4px 12px 16px; }
.mp-lightbox { position: relative; display: flex; align-items: center; justify-content: center; min-height: 160px; }
.mp-lightbox-img { display: block; max-width: 100%; max-height: min(70vh, 640px); object-fit: contain; border-radius: 12px; }
.mp-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  background: rgba(8, 20, 38, 0.8); border: 1px solid var(--line); border-radius: 50%;
  color: var(--yellow); cursor: pointer;
}
.mp-lightbox-nav:hover { background: rgba(8, 20, 38, 0.95); border-color: var(--yellow); }
.mp-lightbox-nav svg { width: 18px !important; height: 18px !important; }
.mp-lightbox-prev { left: 6px; }
.mp-lightbox-next { right: 6px; }

/* Контакты и мессенджеры */
.mp-contacts { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mp-contact {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 214, 64, 0.06);
  border: 1px solid var(--line-soft); border-radius: 12px;
  color: var(--text); text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.mp-contact:hover { background: rgba(255, 214, 64, 0.12); border-color: rgba(255, 214, 64, 0.4); }
.mp-contact-icon {
  flex-shrink: 0; width: 34px; height: 39px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(165deg, #FFDE5A 0%, #F0BB10 100%);
  clip-path: var(--hex-clip);
}
.mp-contact-icon svg { width: 16px !important; height: 16px !important; color: var(--ink); }
.mp-contact-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.mp-contact-label { font-size: 11px; font-weight: 600; color: var(--text-muted); }

.mp-lock {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px;
  border: 1px dashed rgba(255, 214, 64, 0.35); border-radius: 12px;
  font-size: 13px; line-height: 1.45; color: rgba(245, 247, 250, 0.85);
}
.mp-lock svg { flex-shrink: 0; width: 18px !important; height: 18px !important; margin-top: 1px; color: var(--yellow); }

.mp-messengers { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.mp-messengers + .mp-lock { margin-top: 14px; }
.mp-messenger {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 88px; height: 101px;
  background: linear-gradient(165deg, #FFDE5A 0%, #FFD640 35%, #F0BB10 100%);
  clip-path: var(--hex-clip);
  font-size: 10px; font-weight: 800; text-align: center; text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s;
}
.mp-messenger svg { width: 24px !important; height: 24px !important; }
a.mp-messenger:hover { transform: translateY(-2px); }
a.mp-messenger:focus-visible { outline: none; background: #fff; }
.mp-messenger.is-locked { background: rgba(26, 50, 82, 0.9); color: var(--text-muted); }

/* График и прайс-лист */
.mp-schedule, .mp-prices { margin: 0; padding: 0; list-style: none; }
.mp-schedule-row, .mp-price-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.mp-schedule-row:last-child, .mp-price-row:last-child { padding-bottom: 0; border-bottom: none; }
.mp-schedule-row:first-child, .mp-price-row:first-child { padding-top: 0; }
.mp-schedule-day { font-weight: 700; }
.mp-schedule-time { font-weight: 800; color: var(--yellow); font-variant-numeric: tabular-nums; }
.mp-schedule-time.is-off { font-weight: 600; color: var(--text-muted); }
.mp-price-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; }
.mp-price-name svg { flex-shrink: 0; width: 15px !important; height: 15px !important; color: var(--yellow); }
.mp-price-value { flex-shrink: 0; font-weight: 800; color: var(--yellow); white-space: nowrap; }

/* ===== Профиль мастера: заказ ===== */
.mp-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.mp-actions .btn-next { margin-top: 0; padding: 18px 15px; font-size: 16px; }
.mp-actions .btn-next:disabled { cursor: not-allowed; }
.mp-actions-note { text-align: center; font-size: 12px; line-height: 1.4; color: var(--text-muted); }
