/* Подбор и сравнение специалистов: самостоятельный модуль каталога. */
.selection-assistant { margin-bottom: var(--space-xl); }
.selection-assistant [hidden], .selection-compare-overlay[hidden] { display: none !important; }
.selection-entry { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.selection-entry h2 { margin: 0 0 var(--space-sm); font-size: 1.4rem; }
.selection-entry p { margin: 0; color: var(--text-muted); max-width: 760px; }
.selection-entry-actions { display: flex; flex-direction: column; gap: var(--space-sm); flex: 0 0 auto; }
.selection-panel, .selection-results { margin-top: var(--space-md); }
.selection-panel { scroll-margin-top: calc(var(--header-height) + 1rem); }
.selection-step-header, .selection-results-header, .selection-compare-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-md); }
.selection-step-header > span { color: var(--text-dim); font-size: .85rem; }
.selection-panel h3, .selection-results-header h2 { margin-bottom: var(--space-md); }
.selection-close { border: 0; background: transparent; color: var(--text-muted); font-size: 1.8rem; line-height: 1; cursor: pointer; min-width: 44px; min-height: 44px; }
.selection-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-sm); margin: var(--space-md) 0; }
.selection-choice { min-height: 46px; padding: .65rem .8rem; border: 1px solid var(--border-medium); border-radius: var(--radius-md); background: var(--surface); color: var(--text-primary); cursor: pointer; text-align: left; }
.selection-choice:hover, .selection-choice:focus-visible { border-color: var(--primary); outline: 2px solid transparent; }
.selection-choice.is-selected { border-color: var(--primary); background: var(--bg-tint-sage); box-shadow: inset 0 0 0 1px var(--primary); }
.selection-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-md); margin: var(--space-md) 0; }
.selection-fields label, .selection-panel label { display: block; margin-bottom: 6px; font-weight: 600; }
.selection-panel label.selection-check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; color: var(--text-secondary); margin: var(--space-sm) 0; }
.selection-check input { margin-top: 4px; flex: 0 0 auto; }
.selection-muted { color: var(--text-muted); font-size: .9rem; }
.selection-error { color: #A85448; margin: var(--space-sm) 0; }
.selection-step-actions { display: flex; justify-content: flex-end; gap: var(--space-sm); margin-top: var(--space-lg); }
.selection-summary { padding: var(--space-md); background: var(--bg-tint-sage); border-radius: var(--radius-md); margin: var(--space-md) 0; }
.selection-summary p { margin: .35rem 0 0; color: var(--text-secondary); }
.selection-results-header { align-items: center; }
.selection-results-header p { margin: 0; color: var(--text-muted); }
.selection-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.selection-result-card { display: flex; flex-direction: column; }
.selection-result-top { display: flex; align-items: center; gap: var(--space-md); }
.selection-result-top img, .selection-avatar-fallback { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.selection-avatar-fallback { display: grid; place-items: center; background: var(--bg-tint-sage); color: var(--primary); font-size: 2rem; }
.selection-result-top h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.selection-result-top p { margin: 0; color: var(--text-muted); font-size: .85rem; }
.selection-result-meta { color: var(--text-secondary); font-size: .9rem; margin: var(--space-md) 0 var(--space-sm); }
.selection-unknown { color: var(--text-dim); font-size: .8rem; }
.selection-why { color: var(--text-secondary); font-size: .88rem; flex: 1; }
.selection-why ul { padding-left: 1.1rem; margin-bottom: var(--space-md); }
.selection-card-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: auto; padding-top: var(--space-md); }
.selection-more { display: block; margin: var(--space-lg) auto 0; }
.selection-empty { text-align: center; padding: var(--space-xl); }
.selection-relaxed { padding: var(--space-md); margin-bottom: var(--space-md); border-left: 3px solid var(--primary); background: var(--bg-tint-sage); border-radius: var(--radius-sm); }
.selection-catalog-compare { margin-top: var(--space-sm); }
.selection-toast { position: fixed; right: 1rem; bottom: 6rem; z-index: 1200; max-width: min(420px, calc(100vw - 2rem)); padding: .8rem 1rem; border-radius: var(--radius-md); background: var(--text-primary); color: var(--surface); box-shadow: var(--shadow-lg); }
.selection-compare-bar { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 1100; width: min(620px, calc(100vw - 2rem)); display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding: .75rem 1rem; border: 1px solid var(--border-medium); border-radius: var(--radius-full); background: var(--surface); box-shadow: var(--shadow-lg); }
.selection-compare-bar > div { display: flex; gap: var(--space-sm); }
.selection-has-compare { padding-bottom: 82px; }
.selection-compare-overlay { position: fixed; inset: 0; z-index: 1150; overflow-y: auto; padding: 5vh 1rem; background: rgba(30, 30, 30, .6); }
.selection-compare-modal { max-width: 1100px; margin: 0 auto; }
.selection-compare-row { display: grid; grid-template-columns: minmax(120px, .65fr) repeat(var(--compare-count, 3), minmax(0, 1fr)); gap: var(--space-md); padding: var(--space-md) 0; border-bottom: 1px solid var(--border-subtle); }
.selection-compare-label { font-weight: 700; }
.selection-compare-value { color: var(--text-secondary); overflow-wrap: anywhere; }
.selection-compare-person { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
.selection-compare-person img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.selection-compare-person span { color: var(--text-muted); font-size: .85rem; }
.selection-compare-person .btn { margin-top: .3rem; }
@media (max-width: 800px) {
  .selection-entry { flex-direction: column; align-items: stretch; }
  .selection-entry-actions { flex-direction: row; flex-wrap: wrap; }
  .selection-results-header { flex-direction: column; }
  .selection-compare-row { grid-template-columns: 1fr; gap: var(--space-sm); padding: var(--space-md) 0; }
  .selection-compare-label { padding-bottom: .2rem; border-bottom: 1px dashed var(--border-subtle); }
  .selection-compare-profiles { grid-template-columns: 1fr; }
  .selection-compare-person { display: grid; grid-template-columns: auto 1fr; align-items: center; }
  .selection-compare-person img { grid-row: span 3; }
}
@media (max-width: 520px) {
  .selection-choice-grid { grid-template-columns: 1fr 1fr; }
  .selection-result-grid { grid-template-columns: 1fr; }
  .selection-step-actions { flex-direction: column-reverse; }
  .selection-step-actions .btn { width: 100%; }
  .selection-compare-bar { border-radius: var(--radius-lg); flex-direction: column; align-items: stretch; gap: .5rem; }
  .selection-compare-bar > div { justify-content: space-between; }
  .selection-compare-overlay { padding: 1rem .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .selection-assistant *, .selection-assistant *::before, .selection-assistant *::after { scroll-behavior: auto !important; transition: none !important; }
}
