/* What someone may do, drawn from the family deck's permissions card: the tier boxes, the separate
   grants as switches, and Save. Deck weights read through the 2026-09-09 scale. */

#akashic-health-records-patient-portal-root .care-access {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#akashic-health-records-patient-portal-root .care-access-head {
  display: flex;
  flex-direction: column;
}
#akashic-health-records-patient-portal-root .care-access-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
  font-weight: var(--ak-heading-weight);
  color: var(--ink-strong);
}
#akashic-health-records-patient-portal-root .care-access-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}
#akashic-health-records-patient-portal-root .care-access-spinner {
  color: var(--ink-muted);
}

/* On its own the choices sit in a bordered card; beside a person header they are the card. */
#akashic-health-records-patient-portal-root .care-access-card {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
#akashic-health-records-patient-portal-root .care-access--pane .care-access-card {
  padding: 0;
  border: 0;
  background: transparent;
}

#akashic-health-records-patient-portal-root .care-access-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 2px;
  font-size: 13px;
  font-weight: var(--ak-label-weight);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .care-access-alert {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
#akashic-health-records-patient-portal-root .care-access-alert-text,
#akashic-health-records-patient-portal-root .care-access-error {
  margin: 0;
  font-size: 13px;
  color: var(--destructive);
}

/* The three tiers: a bordered box each, the chosen one blue. */
#akashic-health-records-patient-portal-root .tier-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#akashic-health-records-patient-portal-root .tier-choice {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 2px 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
#akashic-health-records-patient-portal-root .tier-choice[data-selected="true"] {
  border-color: var(--primary);
  background: var(--blue-soft);
}
#akashic-health-records-patient-portal-root .tier-choice-radio {
  align-self: center;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--line);
  background: var(--surface);
}
#akashic-health-records-patient-portal-root .tier-choice[data-selected="true"] .tier-choice-radio {
  border: 4.5px solid var(--primary);
}
#akashic-health-records-patient-portal-root .tier-choice[data-selected="true"] .tier-choice-radio svg {
  display: none;
}
#akashic-health-records-patient-portal-root .tier-choice-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  cursor: pointer;
}
/* A choice that cannot be made is drawn as one, not only its small radio. */
#akashic-health-records-patient-portal-root .tier-choice[data-disabled="true"] {
  opacity: 0.55;
}
#akashic-health-records-patient-portal-root .tier-choice[data-disabled="true"] .tier-choice-label {
  cursor: not-allowed;
}
#akashic-health-records-patient-portal-root .tier-choice-name {
  font-size: 13px;
  font-weight: var(--ak-heading-weight);
  color: var(--ink-strong);
}
#akashic-health-records-patient-portal-root .tier-choice[data-selected="true"] .tier-choice-name {
  color: var(--primary);
}
#akashic-health-records-patient-portal-root .tier-choice-description {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .care-access-proofing {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding: 6px 8px;
  border-radius: 5px;
  background: var(--amber-soft);
  font-size: 12px;
  color: var(--warning);
}

#akashic-health-records-patient-portal-root .care-access-separately {
  display: flex;
  flex-direction: column;
}

/* A grant is a row: what it allows, then its switch. */
#akashic-health-records-patient-portal-root .care-access-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}
#akashic-health-records-patient-portal-root .care-access-check-label {
  font-size: 13px;
  color: var(--ink-strong);
  cursor: pointer;
}
#akashic-health-records-patient-portal-root .care-access-toggle [data-slot="switch"] {
  width: 34px;
  height: 20px;
}
#akashic-health-records-patient-portal-root .care-access-toggle [data-slot="switch"][data-state="checked"] {
  background: var(--primary);
}
#akashic-health-records-patient-portal-root .care-access-toggle [data-slot="switch"][data-state="unchecked"] {
  background: var(--line);
}
#akashic-health-records-patient-portal-root .care-access-toggle [data-slot="switch-thumb"] {
  background: var(--surface);
}

#akashic-health-records-patient-portal-root .care-access-note {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .care-access-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
#akashic-health-records-patient-portal-root .care-access-actions > :first-child:not(:last-child) {
  margin-right: auto;
}
