/* «Поиск группы» — the party finder sheet (#7431, web/finder.js).
 * Forge-Glass (ADR-0013): glass, the one gold accent, dark only. Built on the
 * shared .glass / .btn / .seg / .chip-row / .pill / .input / .select of
 * app.css; everything here is scoped under .fdr. #finderRoot is a sibling of
 * #app (z 3): the overlay sits above the app and under the toast (30); the
 * app's own dialogs inside #app (the party invite popup) make the sheet step
 * aside (.fdr-under, finder.js watchPopup). */

#finderRoot.fdr-under .fdr {
  visibility: hidden;
  pointer-events: none;
}

.fdr {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(6, 7, 10, 0.6);
  padding-top: env(safe-area-inset-top, 0px);
  animation: fdr-fade 0.18s var(--ease);
}

.fdr-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  border-radius: 18px 18px 0 0;
  border-bottom: 0;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(14, 15, 20, 0.92);
  animation: fdr-rise 0.22s var(--ease);
}

@keyframes fdr-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fdr-rise {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .fdr,
  .fdr-sheet {
    animation: none;
  }
}

.fdr-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.fdr-head b {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.fdr-x,
.fdr-back {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 22px;
  line-height: 1;
  min-width: 36px;
  min-height: 36px;
  border-radius: 9px;
  cursor: pointer;
}
.fdr-x:hover,
.fdr-back:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.fdr-tabs {
  margin-bottom: 10px;
}
.fdr-count {
  display: inline-block;
  margin-left: 6px;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 10.5px;
  line-height: 16px;
  background: var(--accent);
  color: var(--on-accent);
}

.fdr-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 4px;
}

.fdr-levels {
  flex: 0 0 auto;
}
.fdr-kinds {
  margin-top: 0;
}
.fdr-actions {
  display: flex;
}
.fdr-why {
  margin-top: -4px;
}
.fdr-notice {
  font-size: 12px;
  color: var(--accent-strong);
  border: 1px solid rgba(201, 162, 75, 0.35);
  background: rgba(201, 162, 75, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
}
.fdr-empty {
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
  padding: 22px 8px;
}
.fdr-empty .note {
  margin-top: 6px;
}

/* === a room in the list ==================================================== */
.fdr-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fdr-room {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 12px;
}
.fdr-room--want {
  border-color: rgba(201, 162, 75, 0.45);
}
.fdr-room--mine {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(201, 162, 75, 0.18);
}
.fdr-room-title {
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.fdr-room-note {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink);
  opacity: 0.85;
  font-style: italic;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.fdr-room-host {
  font-size: 12px;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}
.fdr-room-host .lbl {
  font-size: 11px;
}
.fdr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.fdr-meta .pill {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
  font-size: 10.5px;
}
.fdr-left {
  color: var(--ink-muted);
}
.fdr-room-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

/* the role pick before «Вход в комнату» */
.fdr-enter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid var(--glass-border);
}
.fdr-roles button {
  font-size: 11.5px;
  padding: 7px 2px;
}

.fdr-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fdr-row--wrap {
  flex-wrap: wrap;
}
.fdr-row .btn {
  flex: 1 1 auto;
}

/* === my room =============================================================== */
.fdr-mine {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}
.fdr-confirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(207, 91, 84, 0.45);
  background: rgba(207, 91, 84, 0.07);
  border-radius: 10px;
  padding: 9px 10px;
}
.fdr-confirm-q {
  font-size: 12.5px;
  color: var(--ink);
}

.fdr-sec {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fdr-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
  padding: 0 2px;
}
.fdr-sec-head .lbl {
  font-family: var(--font-body);
}
.fdr-people {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fdr-person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}
.fdr-person-main {
  flex: 1 1 150px;
  min-width: 0;
}
.fdr-person-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.fdr-person-main .note {
  margin-top: 2px;
}
.fdr-tag {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 10px;
  padding: 2px 7px;
}
.fdr-person-acts {
  display: flex;
  gap: 6px;
  flex: 1 1 100%;
  justify-content: flex-end;
}
.fdr-none {
  padding: 4px 2px;
}

/* === the open / edit form ==================================================== */
.fdr-field {
  gap: 6px;
}
.fdr-field .select,
.fdr-field .input {
  width: 100%;
}
.fdr-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fdr-range .input {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
.fdr-dash {
  color: var(--ink-muted);
}
.fdr-counters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.fdr-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 6px 6px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  min-width: 0;
}
.fdr-counter-label {
  font-size: 12.5px;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}
.fdr-counter-ctl {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.fdr-counter-n {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  color: var(--accent-strong);
}
.fdr-step {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.fdr-step:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-strong);
}
.fdr-step:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.fdr-note-count {
  text-align: right;
}
.fdr-error {
  font-size: 12.5px;
  color: #f0c9c9;
  border: 1px solid rgba(220, 90, 90, 0.5);
  background: rgba(207, 91, 84, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
}
.fdr-form-btns {
  position: sticky;
  bottom: 0;
  padding-top: 6px;
  background: linear-gradient(180deg, rgba(14, 15, 20, 0), rgba(14, 15, 20, 0.95) 30%);
}
