/* Interaction-focused usability refinements layered after owner-identity.css. */

:where(button, a, input, select, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(11, 94, 215, 0.34);
  outline-offset: 2px;
}

.sidebar :where(button, a):focus-visible,
.topbar :where(button, a):focus-visible,
.owner-mobile-bottom-nav :where(button, a):focus-visible {
  outline-color: rgba(255, 255, 255, 0.78);
}

.owner-mobile-more-sheet :where(button, a):focus-visible {
  outline-color: rgba(11, 94, 215, 0.62);
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
}

/* School Connect owns reader operations. Central Owner is Enterprise-only for School Connect. */
[data-testid="readers-nav"] {
  display: none !important;
}

/* Give the long desktop navigation lightweight grouping without changing routes. */
@media (min-width: 961px) {
  .sidebar nav .nav-item:nth-child(3),
  .sidebar nav .nav-item:nth-child(6) {
    position: relative;
    margin-top: 8px;
  }

  .sidebar nav .nav-item:nth-child(3)::before,
  .sidebar nav .nav-item:nth-child(6)::before {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    top: -5px;
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
  }
}

/* Keep organization context controls visible while reviewing long detail surfaces. */
.detail-tabs {
  position: sticky;
  top: 62px;
  z-index: 18;
  padding: 5px 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

/* Long onboarding/edit dialogs should keep the decision row available. */
.modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 16;
  margin-top: 4px;
  padding: 10px 0 max(2px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
}

/* Improve click/keyboard affordance for row-driven drill-down. */
.data-table tbody tr:focus-within,
.data-table tbody tr.selected-row,
.organization-card:focus-within,
.reader-card:focus-within {
  box-shadow: inset 0 0 0 2px rgba(11, 94, 215, 0.18);
}

.data-table tbody tr,
.organization-card,
.reader-card {
  scroll-margin-top: 84px;
}

details > summary {
  border-radius: 8px;
}

@media (max-width: 960px) {
  .detail-tabs {
    position: static;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }
}
