/* CTO-160: family members. Switcher rows, add/edit/remove. Tap targets >= 48px. */

.appbar-switch,
.appbar-switch:visited {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  color: var(--text-primary);
  text-decoration: none;
}

.appbar-switch .appbar-who {
  display: flex;
  flex-direction: column;
}

.appbar-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 10px;
}

.family-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
}

.list-card > .family-row:last-child,
.list-card > .family-switch:last-child {
  border-bottom: none;
}

.family-switch {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.list-card > .family-switch {
  border-bottom: 1px solid var(--border);
}

.family-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
}

.family-pick[aria-current="true"] {
  background: var(--accent-light);
}

.family-pick:hover {
  background: var(--surface);
}

.family-pick:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.family-edit,
.family-edit:visited {
  display: flex;
  align-items: center;
  min-width: 56px;
  min-height: 48px;
  padding: 0 14px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.family-edit:focus-visible,
.family-remove-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.family-add,
.family-cancel {
  margin-top: 16px;
}

.family-remove-link,
.family-remove-link:visited {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 18px;
  color: #a1281d;
  font-weight: 600;
}

.family-warning {
  margin: 14px 0;
  padding: 14px;
  border: 1.5px solid #a1281d;
  border-radius: var(--v-radius-card);
  background: var(--bg);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.45;
}

.family-keep,
.family-keep:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.family-keep:focus-visible {
  outline: 3px solid var(--text-primary);
  outline-offset: 2px;
}

.family-danger {
  width: 100%;
  min-height: 48px;
  margin-top: 32px;
  border: 1.5px solid #a1281d;
  border-radius: 14px;
  background: var(--bg);
  color: #a1281d;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.family-danger:focus-visible {
  outline: 3px solid var(--text-primary);
  outline-offset: 2px;
}

.family-row:has([aria-current="true"]) {
  background: var(--accent-light);
}

.appbar > a.avatar {
  position: relative;
}

.appbar > a.avatar::after {
  content: "";
  position: absolute;
  inset: -6px;
}
