/* HTNS v237 — compact Sermon Schedule rows with whole-row Admin/Super actions. */
#view-albums{
  --preach-date-tile-size:36px !important;
}

/* Four columns only: Date, Pastor, Translator, HD. */
#view-albums .resource-preach-roster-head,
#view-albums .resource-preach-item{
  display:grid !important;
  grid-template-columns:44px minmax(0,1.05fr) minmax(0,1.15fr) minmax(0,.76fr) !important;
  grid-template-rows:1fr !important;
  column-gap:7px !important;
  align-items:center !important;
}
#view-albums .resource-preach-roster-head{
  min-height:30px !important;
  padding:0 6px !important;
}
#view-albums .resource-preach-roster-head > span{
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
#view-albums .resource-preach-roster-head > span:first-child{
  text-align:center !important;
}
#view-albums .resource-preach-item{
  min-height:48px !important;
  padding:4px 6px !important;
  border:0 !important;
  border-bottom:1px solid #dce8f1 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
#view-albums .resource-preach-item:last-child{border-bottom:0 !important;}
#view-albums .resource-preach-item-manageable{
  cursor:pointer !important;
  outline:none !important;
  -webkit-tap-highlight-color:transparent !important;
}
#view-albums .resource-preach-item-manageable:hover{background:#f5faff !important;}
#view-albums .resource-preach-item-manageable:active{background:#eaf4fb !important;}
#view-albums .resource-preach-item-manageable:focus-visible{
  outline:2px solid rgba(47,111,152,.22) !important;
  outline-offset:-2px !important;
}

/* Smaller date tile. */
#view-albums .resource-preach-date{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:0 !important;
  overflow:visible !important;
}
#view-albums .resource-preach-date-tile{
  box-sizing:border-box !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:1px !important;
  width:36px !important;
  height:40px !important;
  min-width:36px !important;
  min-height:40px !important;
  margin:0 !important;
  padding:2px 3px !important;
  border:1px solid #aec7d9 !important;
  border-radius:9px !important;
  background:linear-gradient(180deg,#ffffff 0%,#eaf3f9 100%) !important;
  color:#123b67 !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
#view-albums .resource-preach-date-tile small{
  display:block !important;
  margin:0 0 1px !important;
  padding:0 !important;
  color:#4c7e9e !important;
  font-size:6.5px !important;
  line-height:7px !important;
  font-weight:900 !important;
  letter-spacing:.06em !important;
  white-space:nowrap !important;
}
#view-albums .resource-preach-date-tile b{
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  color:#123b67 !important;
  font-size:16px !important;
  line-height:17px !important;
  font-weight:950 !important;
  white-space:nowrap !important;
}

/* Names are plain text and remain on one visual line. */
#view-albums .resource-preach-value:not(.resource-preach-date){
  min-width:0 !important;
  overflow:hidden !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
#view-albums .resource-preach-value:not(.resource-preach-date) small{display:none !important;}
#view-albums .resource-preach-value:not(.resource-preach-date) > span,
#view-albums .resource-preach-value:not(.resource-preach-date) > b,
#view-albums .resource-preach-value:not(.resource-preach-date) > button{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#16385c !important;
  font-size:clamp(9px,2.45vw,11px) !important;
  font-weight:500 !important;
  line-height:1.15 !important;
  letter-spacing:-.01em !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

/* Permanent Edit/Delete controls are gone from roster rows. */
#view-albums .resource-preach-actions,
#view-albums .resource-preach-edit,
#view-albums .resource-preach-remove{display:none !important;}

/* Keep all four fields on a single row on phones too. */
@media(max-width:430px){
  #view-albums .resource-preach-roster{overflow:hidden !important;}
  #view-albums .resource-preach-roster-head{
    display:grid !important;
    grid-template-columns:40px minmax(0,1.04fr) minmax(0,1.14fr) minmax(0,.74fr) !important;
    gap:5px !important;
    min-height:28px !important;
    padding:0 5px !important;
  }
  #view-albums .resource-preach-roster-head span{font-size:7px !important;}
  #view-albums .resource-preach-list{
    display:block !important;
    padding:0 !important;
    gap:0 !important;
  }
  #view-albums .resource-preach-item{
    display:grid !important;
    grid-template-columns:40px minmax(0,1.04fr) minmax(0,1.14fr) minmax(0,.74fr) !important;
    grid-template-rows:1fr !important;
    gap:5px !important;
    min-height:45px !important;
    padding:3px 5px !important;
    border-radius:0 !important;
  }
  #view-albums .resource-preach-item .resource-preach-value:nth-child(1),
  #view-albums .resource-preach-item .resource-preach-value:nth-child(2),
  #view-albums .resource-preach-item .resource-preach-value:nth-child(3),
  #view-albums .resource-preach-item .resource-preach-value:nth-child(4){
    grid-column:auto !important;
    grid-row:1 !important;
    align-self:center !important;
  }
  #view-albums .resource-preach-date-tile{
    width:34px !important;
    height:38px !important;
    min-width:34px !important;
    min-height:38px !important;
    border-radius:8px !important;
  }
  #view-albums .resource-preach-date-tile small{font-size:6px !important;line-height:6px !important;}
  #view-albums .resource-preach-date-tile b{font-size:15px !important;line-height:16px !important;}
  #view-albums .resource-preach-value:not(.resource-preach-date) > span,
  #view-albums .resource-preach-value:not(.resource-preach-date) > b,
  #view-albums .resource-preach-value:not(.resource-preach-date) > button{
    font-size:clamp(8.5px,2.35vw,10px) !important;
  }
}
@media(max-width:350px){
  #view-albums .resource-preach-roster-head,
  #view-albums .resource-preach-item{
    grid-template-columns:37px minmax(0,1.05fr) minmax(0,1.15fr) minmax(0,.70fr) !important;
    gap:4px !important;
  }
  #view-albums .resource-preach-date-tile{
    width:32px !important;
    min-width:32px !important;
    height:36px !important;
    min-height:36px !important;
  }
  #view-albums .resource-preach-value:not(.resource-preach-date) > span,
  #view-albums .resource-preach-value:not(.resource-preach-date) > b,
  #view-albums .resource-preach-value:not(.resource-preach-date) > button{font-size:8.4px !important;}
}

/* Compact row action sheet for Admin/Super users. */
#modal .resource-preach-action-modal{align-items:flex-end !important;}
#modal .resource-preach-action-sheet{
  width:min(100%,430px) !important;
  padding:14px !important;
}
#modal .resource-preach-action-summary{
  display:grid !important;
  grid-template-columns:46px minmax(0,1fr) !important;
  gap:10px !important;
  align-items:center !important;
  margin:12px 0 !important;
  padding:10px !important;
  border:1px solid #d3e0eb !important;
  border-radius:12px !important;
  background:linear-gradient(100deg,#ffffff 0%,#eef6fb 100%) !important;
}
#modal .resource-preach-action-summary .resource-preach-date-tile{
  box-sizing:border-box !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  width:38px !important;
  height:42px !important;
  min-width:38px !important;
  min-height:42px !important;
  border:1px solid #aec7d9 !important;
  border-radius:9px !important;
  background:linear-gradient(180deg,#ffffff 0%,#eaf3f9 100%) !important;
  color:#123b67 !important;
  box-shadow:none !important;
}
#modal .resource-preach-action-summary .resource-preach-date-tile small{color:#4c7e9e !important;font-size:6.5px !important;}
#modal .resource-preach-action-summary .resource-preach-date-tile b{color:#123b67 !important;font-size:16px !important;}
#modal .resource-preach-action-copy{min-width:0 !important;}
#modal .resource-preach-action-copy b,
#modal .resource-preach-action-copy span,
#modal .resource-preach-action-copy small{
  display:block !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
#modal .resource-preach-action-copy b{color:#16385c !important;font-size:13px !important;}
#modal .resource-preach-action-copy span{margin-top:3px !important;color:#16385c !important;font-size:12px !important;}
#modal .resource-preach-action-copy small{margin-top:2px !important;color:#72889a !important;font-size:10px !important;}
#modal .resource-preach-action-buttons{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:8px !important;
}
#modal .resource-preach-action-buttons .btn{min-height:40px !important;margin:0 !important;}

[data-theme="dark"] #view-albums .resource-preach-date-tile,
[data-theme="dark"] #modal .resource-preach-action-summary .resource-preach-date-tile{
  background:#1c3a4c !important;
  border-color:#4d7085 !important;
  color:#e6f1f6 !important;
}
[data-theme="dark"] #view-albums .resource-preach-date-tile small,
[data-theme="dark"] #modal .resource-preach-action-summary .resource-preach-date-tile small{color:#8fc0dc !important;}
[data-theme="dark"] #view-albums .resource-preach-date-tile b,
[data-theme="dark"] #modal .resource-preach-action-summary .resource-preach-date-tile b,
[data-theme="dark"] #view-albums .resource-preach-value:not(.resource-preach-date) > span{color:#eef6fd !important;}
[data-theme="dark"] #modal .resource-preach-action-summary{background:#173344 !important;border-color:#315365 !important;}
