/* AIER Group Membership — parent/child selection modal
   ------------------------------------------------------------
   Namespaced under #aier-others-* / .aier-others-* throughout so nothing
   here can collide with aier-membership.css. Opened by clicking the
   existing Group Membership tile (#aier-membership-group-tile) — see
   aier-membership-others.js. */

body.aier-others-modal-open {
  overflow: hidden;
}

.aier-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 32, 0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.aier-modal-overlay.aier-hidden {
  display: none;
}

.aier-others-modal {
  background: #f2f8f8;
  width: 100%;
  max-width: 900px;
  max-height: 88vh;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.aier-others-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: #0f2733;
}
.aier-others-modal-title {
  display: inline-block;
  /* background: #1499a6; */
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.03em;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 4px;
}
.aier-others-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.aier-others-modal-close:hover {
  opacity: 0.75;
}

.aier-others-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.aier-others-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.aier-others-table thead th {
  text-align: left;
  font-weight: 700;
  color: #1a2b33;
  padding: 10px 12px;
  border-bottom: 2px solid #d7e6e6;
}
.aier-others-th-sub {
  font-weight: 400;
  color: #6b7c82;
  font-size: 12px;
}
.aier-others-table tbody tr {
  border-bottom: 1px solid #e2edec;
}
.aier-others-table tbody td {
  padding: 9px 12px;
  vertical-align: top;
  color: #1a2b33;
}
.aier-others-parent-cell {
  font-size: 14px;
  padding-top: 12px !important;
}
.aier-others-table tbody td:last-child {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
}

.aier-others-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.aier-others-option input[type='radio'] {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: #1499a6;
  cursor: pointer;
}
.aier-others-option input[type='radio']:disabled {
  cursor: not-allowed;
}
.aier-others-option:has(input:disabled) {
  color: #a8b3b6;
  cursor: not-allowed;
}

/* The relocated #aier-mem-group-roster panel sits here once a selection
   is Added — the panel brings its own internal styling from the main
   page, this just gives it breathing room inside the modal shell. */
#aier-others-group-slot {
  margin-top: 4px;
}
#aier-others-group-back {
  margin-bottom: 12px;
}

.aier-others-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #d7e6e6;
  background: #fff;
}

@media (max-width: 640px) {
  .aier-others-modal-body {
    padding: 14px;
  }
  .aier-others-table {
    font-size: 13px;
  }
}