.aofb-access {
  --aofb-ua-border: var(--border, #e2e8f0);
  --aofb-ua-muted: var(--muted, #475569);
  --aofb-ua-text: var(--text, #1e293b);
  --aofb-ua-blue: var(--blue, #215bc2);
  --aofb-ua-radius: var(--radius, 10px);
  --aofb-ua-tint: #f0f6fc;
  --aofb-ua-row-border: #eef1f6;
  color: var(--aofb-ua-text);
}
.aofb-access h2 {
  margin: 0 0 6px;
}
.aofb-access input[type=search]:focus,
.aofb-access select:focus {
  border-color: var(--aofb-ua-blue);
  outline: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--aofb-ua-blue);
}

.aofb-access__intro {
  margin: 0 0 20px;
  max-width: 900px;
  color: var(--aofb-ua-muted);
}

.aofb-access__notice:empty {
  display: none;
}
.aofb-access__notice .notice {
  margin: 0 0 16px;
}

.aofb-access__label {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--aofb-ua-text);
}

.aofb-access__input {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
}

.aofb-access__hint {
  color: var(--aofb-ua-muted);
}

.aofb-access__inline-message {
  margin: 6px 0 0;
  color: #b32d2e;
}
.aofb-access__inline-message:empty {
  display: none;
}

.aofb-access-card {
  background: #fff;
  border: 1px solid var(--aofb-ua-border);
  border-radius: var(--aofb-ua-radius);
  margin: 0 0 20px;
  padding: 20px 24px;
}

.aofb-access-card__title {
  margin: 0 0 16px;
  font-size: 15px;
}

.aofb-access-card__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 32px;
}

.aofb-access-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--aofb-ua-row-border);
}

.aofb-access-people {
  min-width: 0;
}
.aofb-access-people .description {
  margin: 6px 0 0;
}

.aofb-combobox {
  position: relative;
}

.aofb-combobox__list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.aofb-combobox__list[hidden] {
  display: none;
}

.aofb-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
}
.aofb-option:hover, .aofb-option.is-active {
  background: var(--aofb-ua-tint);
}
.aofb-option.is-active {
  outline: 1px solid var(--aofb-ua-blue);
  outline-offset: -1px;
}

.aofb-option__check {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
}
.aofb-option[aria-selected=true] .aofb-option__check {
  border-color: var(--aofb-ua-blue);
  background: var(--aofb-ua-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

.aofb-option__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.aofb-option__name {
  font-weight: 600;
}

.aofb-option__meta,
.aofb-option__status {
  color: var(--aofb-ua-muted);
  font-size: 12px;
}

.aofb-option__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aofb-option__status {
  flex: 0 0 auto;
}

.aofb-combobox__options {
  margin: 0;
  padding: 0;
  list-style: none;
}
.aofb-combobox__options:empty {
  display: none;
}

.aofb-combobox__message {
  margin: 0;
  padding: 10px 8px;
  color: var(--aofb-ua-muted);
}
.aofb-combobox__message:empty {
  display: none;
}

.aofb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.aofb-chips[hidden] {
  display: none;
}

.aofb-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 2px 2px 2px 10px;
  background: var(--aofb-ua-tint);
  border: 1px solid #c5d9ed;
  border-radius: 999px;
  font-size: 13px;
}

.aofb-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--aofb-ua-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.aofb-chip__remove:hover {
  background: #dbe7f5;
  color: var(--aofb-ua-text);
}
.aofb-chip__remove:focus {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px var(--aofb-ua-blue);
}

.aofb-access-levels {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.aofb-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
}
.aofb-radio input[type=radio] {
  flex: 0 0 auto;
  margin: 2px 0 0;
}

.aofb-radio__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aofb-radio__title {
  font-weight: 600;
}

.aofb-radio__desc {
  color: var(--aofb-ua-muted);
}

.aofb-access-list {
  margin-top: 28px;
}

.aofb-access-list__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
}
.aofb-access-list__header .search-box {
  float: none;
  margin: 0;
}

.aofb-access-list__title {
  margin: 0;
  font-size: 15px;
}

.aofb-access-table .column-role {
  width: 25%;
}
.aofb-access-table .column-level {
  width: 280px;
}
.aofb-access-table td.column-level select {
  width: 100%;
  max-width: 100%;
}
.aofb-access-table .row-actions .delete .button-link {
  color: #b32d2e;
}
.aofb-access-table .row-actions .delete .button-link:hover, .aofb-access-table .row-actions .delete .button-link:focus {
  color: #b32d2e;
}
.aofb-access-table .row-actions.aofb-row-note {
  position: static;
  left: auto;
  color: var(--aofb-ua-muted);
}
.aofb-access-table .row-actions.aofb-row-note a {
  color: inherit;
  text-decoration: underline;
}
.aofb-access-table .row-actions.aofb-row-note .aofb-row-note__text {
  font-size: 13px;
}
.aofb-access-table tr.is-highlighted {
  animation: aofb-access-highlight 2.4s ease-out;
}
.aofb-access-table .no-items td {
  padding: 0;
}

@keyframes aofb-access-highlight {
  0%, 40% {
    background-color: var(--aofb-ua-tint);
  }
  100% {
    background-color: transparent;
  }
}
.aofb-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.aofb-person__avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dcdcde;
  color: #3c434a;
  font-size: 12px;
  font-weight: 600;
}

.aofb-person__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.aofb-person__login {
  color: var(--aofb-ua-muted);
}

.aofb-access-row__note {
  display: block;
  margin-top: 4px;
  color: var(--aofb-ua-muted);
  font-size: 12px;
}

@media (max-width: 782px) {
  .aofb-access-table.wp-list-table tr td:nth-child(n+2) {
    flex: 0 1 100%;
  }
  .aofb-access-table.wp-list-table tr:not(.no-items) td.column-primary::before {
    content: none;
  }
  .aofb-access-list__header .search-box input[type=search] {
    flex: 1 1 auto;
  }
}
.aofb-access-empty {
  padding: 32px 24px;
  text-align: center;
  color: var(--aofb-ua-muted);
}

.aofb-access-empty__icon {
  color: #a7aaad;
}

.aofb-access-empty__title {
  margin: 8px 0 4px;
  font-weight: 600;
  color: var(--aofb-ua-text);
}

.aofb-access-empty__text {
  margin: 0;
}

@media (max-width: 782px) {
  .aofb-access-card__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .aofb-access-card {
    padding: 16px;
  }
  .aofb-access-card input[type=search] {
    min-height: 44px;
    font-size: 16px;
  }
  .aofb-access-card .button {
    min-height: 44px;
  }
  .aofb-access__grant {
    width: 100%;
  }
  .aofb-chip__remove {
    width: 44px;
    height: 44px;
    margin: -10px -2px -10px 0;
  }
  .aofb-radio,
  .aofb-option {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .aofb-access-table tr.is-highlighted {
    animation: none;
    background-color: var(--aofb-ua-tint);
  }
}
