/* Admin tweaks for phones and the committee identity. */
#header { background:#4A148C; border-bottom:4px solid #E7A93B; }
#header a:link, #header a:visited { color:#fff; }
.hc-brand { display:flex; align-items:center; gap:.5rem; }
.hc-brand img { height:40px; width:auto; }
.hc-links { display:flex; flex-wrap:wrap; gap:.25rem .75rem; margin-inline-start:1rem; }
.hc-links a { padding:.4rem .2rem; }
.hc-profile { font-weight:bold; }
@media (max-width:767px) {
  #header { padding:6px 10px; flex-wrap:wrap; }
  #content { padding:10px; }
  .module h2, .module caption { font-size:.95rem; }
  #changelist .actions { position:sticky; bottom:0; z-index:5; background:#fff; border-top:2px solid #E7A93B; padding:.5rem 10px; }
  #changelist .actions select, #changelist .actions button { min-height:44px; }
  input[type=text], input[type=number], input[type=date], select, textarea { max-width:100%; font-size:16px; }
  .object-tools a { padding:10px 14px; }
  .submit-row { position:static; }
}
/* Phones: forms, changelists, filters, actions bar. */
@media (max-width:767px) {
  /* Fields never wider than the screen. */
  .aligned .form-row > div, .aligned .form-row .flex-container, .form-row .fieldBox { display:block; width:100%; min-width:0; }
  .aligned label { float:none; display:block; width:auto; padding:0 0 4px; }
  .aligned .form-row, fieldset.module { min-width:0; }
  form .aligned input:not([type=checkbox]):not([type=radio]):not([type=file]), form .aligned select:not(.select2-hidden-accessible), form .aligned textarea,
  .related-widget-wrapper, .related-widget-wrapper select:not(.select2-hidden-accessible), .select2-container { width:100% !important; max-width:100%; min-width:0; }
  .aligned .help, .help { margin-inline-start:0; padding-inline-start:0; overflow-wrap:anywhere; }
  .related-widget-wrapper { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
  .related-widget-wrapper > a { padding:6px; }
  /* Inline tables scroll inside their own box instead of widening the page. */
  .inline-group .tabular, .inline-group { overflow-x:auto; max-width:100%; }
  /* Changelist: hide secondary columns, keep name/code/status. */
  #result_list .column-national_id, #result_list .column-phone_1, #result_list .column-neighborhood,
  #result_list .column-family_index, #result_list .column-is_active_unit,
  #result_list .column-aid_type, #result_list .column-family,
  #result_list .column-season, #result_list .column-organization,
  #result_list .field-national_id, #result_list .field-phone_1, #result_list .field-neighborhood,
  #result_list .field-family_index, #result_list .field-is_active_unit,
  #result_list .field-aid_type, #result_list .field-family,
  #result_list .field-season, #result_list .field-organization { display:none; }
  #result_list th:nth-child(n+7), #result_list td:nth-child(n+7) { display:none; }
  #result_list td, #result_list th { padding:10px 6px; overflow-wrap:anywhere; }
  #result_list td a { display:inline-block; min-height:24px; }
  #result_list input[type=checkbox], .action-select { width:22px; height:22px; }
  #changelist .results { overflow-x:auto; }
  #result_list { width:100%; }
  #result_list thead th { white-space:normal; }
  #result_list th .text, #result_list th .text a { padding-inline:2px; }
  #changelist-search > div { display:flex; gap:8px; align-items:center; }
  #changelist-search #searchbar { flex:1 1 auto; width:auto; min-width:0; min-height:44px; }
  #changelist-search input[type=submit] { min-height:44px; flex:0 0 auto; }
  #changelist .actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; position:static; border-top:0; padding:.5rem 0; }
  #changelist .actions label { flex:1 1 0; min-width:0; display:flex; gap:8px; align-items:center; }
  #changelist .actions select { flex:1 1 auto; width:auto; min-width:0; max-width:100%; }
  #changelist .actions .button { flex:0 0 auto; }
  #changelist .actions .action-counter { flex:1 1 100%; }
  .changelist-form-container { display:flex; flex-direction:column; }
  .changelist-form-container > nav#changelist-filter, .hc-filters { order:-1; }
  .hc-filters { margin:0 0 12px; }
  .hc-filters > summary { min-height:44px; display:flex; align-items:center; padding:0 12px; background:#4A148C; color:#fff; border-radius:6px; cursor:pointer; font-weight:bold; }
  #changelist-filter { width:100%; flex:none; margin:8px 0 0; }
  #changelist-filter details > summary { min-height:40px; display:flex; align-items:center; }
  #changelist-filter li a { display:block; padding:8px 0; }
  .paginator a, .paginator span { display:inline-block; padding:8px 10px; }
  .breadcrumbs { overflow-wrap:anywhere; }
}
@media (min-width:768px) {
  .hc-filters { display:contents; }
  .hc-filters > summary { display:none; }
}
.hc-transitions { display:flex; flex-wrap:wrap; gap:.5rem; margin:.5rem 0 1rem; }
.hc-transitions a { display:inline-block; padding:.6rem 1rem; border-radius:6px; background:#4A148C; color:#fff; text-decoration:none; }
.hc-transitions a.danger { background:#b3261e; }
@media (max-width:767px) {
  .toplinks a { display:inline-block; padding:8px 10px; }
}
@media (max-width:767px) {
  .hc-brand { flex-wrap:wrap; }
  .hc-brand #site-name { font-size:15px; margin:0; line-height:1.4; flex:1 1 140px; }
  #user-tools { display:flex; flex-wrap:wrap; align-items:center; gap:0 6px; }
  #user-tools a, #user-tools button { display:inline-flex; align-items:center; padding:0 4px; min-height:40px; }
  #user-tools button.theme-toggle { min-width:40px; }
  .breadcrumbs a { padding:6px 2px; display:inline-block; }
  .hc-links a { padding:10px 6px; display:inline-block; }
  .skip-to-content-link { min-height:40px; }
}
