/* «Мои цены» в стиле Gata: поиск, разделы кнопками, белая карточка со списком работ */

.prices-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

/* Поиск */
.pr-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-muted);
}
.pr-search:focus-within { border-color: var(--btn2-border); }
.pr-search svg { flex-shrink: 0; }
.pr-search-input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  -webkit-appearance: none;
  appearance: none;
}
.pr-search-input::placeholder { color: var(--text-muted); }
.pr-search-input::-webkit-search-cancel-button { display: none; }

/* Разделы кнопками в одну строку с прокруткой */
.pr-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 2px 16px;
  transition: opacity 0.15s ease;
}
.pr-chips::-webkit-scrollbar { display: none; }
.pr-chips.is-off { opacity: 0.55; }
.pr-chip {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.pr-chip:active { transform: scale(0.97); }
.pr-chip.is-on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: 700;
}
.pr-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--copper);
}

/* Карточка раздела */
.pr-list { display: flex; flex-direction: column; gap: 12px; }
.pr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.pr-card-head {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 60px;
  padding: 0 6px 0 0;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border-bottom: 1px solid var(--border);
}
.pr-card-bar {
  flex-shrink: 0;
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--accent-ink);
}
.pr-card-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pr-card-title {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.pr-card-count {
  font-size: 15px;
  color: var(--text-muted);
}
.pr-card-todo { color: var(--copper-ink); font-weight: 600; }
.pr-card-more {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pr-card-more:active { background: var(--surface-active); }
.pr-card-empty,
.pr-empty {
  padding: 18px 16px;
  font-size: 17px;
  color: var(--text-muted);
  text-align: center;
}
.pr-empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}

/* Шапка раздела — кнопка: нажал, и список работ свернулся */
.pr-card-toggle {
  flex: 1;
  min-width: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 8px 16px;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-family: var(--font-body);
  cursor: pointer;
}
.pr-card-toggle:disabled { cursor: default; }
.pr-card-chev {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.pr-card.is-folded .pr-card-chev { transform: rotate(180deg); }
.pr-card.is-folded .pr-card-head { border-bottom: none; }
.pr-card.is-folded .pr-row,
.pr-card.is-folded .pr-card-empty { display: none; }

/* Строка работы */
.pr-row {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  font-family: var(--font-body);
  cursor: pointer;
}
.pr-row:last-child { border-bottom: none; }
.pr-row:active { background: var(--surface-active); }
.pr-row-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pr-row-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.pr-row-sub {
  font-size: 14px;
  color: var(--text-muted);
}
.pr-row-price {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.pr-row-price b {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.pr-row-unit {
  font-size: 14px;
  color: var(--text-muted);
}
.pr-row-none {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--copper-ink);
  border: 1px solid var(--tile-ring);
  background: var(--copper-tint);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.pr-row-chev {
  flex-shrink: 0;
  color: var(--text-muted);
  display: inline-flex;
}

/* Кнопки внизу */
.pr-main-btn {
  min-height: 60px;
  border-radius: 18px;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 800;
  margin-top: 4px;
}
.pr-more {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pr-second-btn {
  width: 100%;
  min-height: 52px;
  gap: 8px;
  font-size: 17px;
}
.pr-second-btn svg { width: 20px; height: 20px; }

/* Первый вход: разделов ещё нет */
.pr-start {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.pr-start-hint {
  font-size: 17px;
  color: var(--text);
  line-height: 1.4;
}

/* Окна «Своя работа» и правка цены */
.pr-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pr-form .form-control { min-height: 48px; font-size: 17px; }
.pr-form .form-label { margin-top: 8px; }
.pr-form-pair {
  display: flex;
  gap: 10px;
}
.pr-form-pair > div { flex: 1; min-width: 0; }
.pr-del-btn {
  margin-top: 14px;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--danger);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.pr-del-btn:active { background: var(--danger-bg); }
