/* Compact CBC actions: a visible surface wherever an action used to be plain text. */
body button.text-button:not(.weather-link) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid #9fb295;
  border-radius: 10px;
  background: #e6eddd;
  color: #244c39;
  box-shadow: 0 1px 1px #173d2910;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
body .quiet-panel button.text-button,
body .progress-save-row button.text-button {
  font-size: 12px;
}
body #tools-back { justify-content: flex-start; }
body .question-guide-actions button.question-next { padding: 9px 13px; }
body .quiet-panel button.text-button { margin-left: auto; }
body .signing-footer button.text-button + button.text-button { margin-left: 6px; }

/* The board's refresh action sits over the forest. */
body .board-status button.text-button { color:#fff5df; background:#214e3e; border-color:#b5c7a6; }

/* Quiet warm accents distinguish removal from navigation without changing its action. */
body button.text-button:not(.weather-link)[data-remove-birthday],
body button.text-button:not(.weather-link)[data-remove-file],
body button.text-button:not(.weather-link)[data-remove-notification],
body button.text-button:not(.weather-link)#disable-push,
body button.text-button:not(.weather-link)#new-application,
body button.text-button:not(.weather-link)#signature-clear {
  background: #f5ede1;
  border-color: #bca890;
  color: #784330;
}

/* Reading a notification is an action too; give the whole existing target a boundary. */
body button.notification-open {
  border: 1px solid #b0bfa3;
  border-radius: 12px;
  background: #f7f9ef;
  padding: 14px;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 1px #173d2910;
}
body .notification-open strong { color: #244c39; }

/* Keep date/time selection and navigation visually recognizable at their existing size. */
body .calendar-grid button.calendar-day {
  background: #f8faf2;
  border: 1px solid #bdcbb1;
  border-radius: 10px;
}
body .calendar-grid button.calendar-day.weekend { background: #e3e9dc; }
body .calendar-grid button.calendar-day[aria-pressed=true] { background: #204d3b; border-color: #204d3b; color: #f4f1df; }
body .office-clock button { border: 1px solid #a8bb9b; }
body .office-clock button[aria-pressed=true] { border-color: #204d3b; }

/* Close targets keep their familiar position and become clearly bounded. */
body button.dialog-close,
body .signing-header > button {
  border: 1px solid #a5b69b;
  background: #edf2e5;
  border-radius: 10px;
  min-width: 40px;
  min-height: 40px;
  padding: 4px;
  line-height: 1;
}
body .portal-modal-content a[href^="/api/portal/infractions/cases/"] {
  display: inline-flex;
  padding: 9px 12px;
  margin: 4px 0;
  min-height: 40px;
  align-items: center;
  border: 1px solid #a9b8a1;
  border-radius: 9px;
  color: #254c39;
  background: #f3f6ed;
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  body button.text-button:not(.weather-link):not(:disabled):hover,
  body button.notification-open:hover { background: #d9e5ce; border-color: #7c9973; }
  body .board-status button.text-button:hover { background: #32624d; border-color: #e0e9d3; }
  body button.text-button:not(.weather-link)[data-remove-birthday]:hover,
  body button.text-button:not(.weather-link)[data-remove-file]:hover,
  body button.text-button:not(.weather-link)[data-remove-notification]:hover,
  body button.text-button:not(.weather-link)#disable-push:hover,
  body button.text-button:not(.weather-link)#new-application:hover,
  body button.text-button:not(.weather-link)#signature-clear:not(:disabled):hover { background: #ebdfcd; border-color: #a28368; }
}
body button.text-button:not(.weather-link):not(:disabled):active,
body button.notification-open:active { box-shadow: inset 0 1px 3px #173d2926; }
body button.text-button:not(.weather-link):disabled { opacity: .45; box-shadow: none; }
body button.text-button:not(.weather-link):focus-visible,
body button.notification-open:focus-visible,
body button.dialog-close:focus-visible,
body .signing-header > button:focus-visible { outline: 3px solid #b18a42; outline-offset: 3px; }
@media (pointer: coarse) {
  body button.text-button:not(.weather-link),
  body button.dialog-close,
  body .signing-header > button { min-height:44px; }
  body button.dialog-close { min-width:44px; }
}
@media (prefers-reduced-motion: reduce) {
  body button.text-button:not(.weather-link) { transition:none; }
}

/* Breathing room for compact action rows, including long names and small screens. */
.portal-back-row { margin:0 0 20px; }
.portal-back-row + * { margin-top:0; }
.portal-back-row button { justify-content:flex-start; }
.portal-modal-content .admin-request { display:flex; flex-direction:column; align-items:flex-start; gap:14px; }
.portal-modal-content .admin-request > h3,
.portal-modal-content .admin-request > p,
.portal-modal-content .admin-request > small,
.portal-modal-content .admin-request > .actions { margin:0; }
.portal-modal-content .admin-request > button:not(.delete-removed-notice) { max-width:100%; white-space:normal; }
.portal-modal-content .admin-request > strong { overflow-wrap:anywhere; }
.saved-announcement-draft .draft-actions { display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:12px; width:100%; }
.saved-announcement-draft .draft-actions > button { flex:0 1 auto; min-width:0; white-space:normal; }
.saved-announcement-draft .draft-delete { background:#f5ede1; border-color:#bca890; color:#784330; }
@media (hover:hover) { .saved-announcement-draft .draft-delete:hover { background:#ebdfcd; border-color:#a28368; } }
.portal-modal-content .birthday-row,
.portal-modal-content .editor-file { flex-wrap:wrap; gap:12px; }
.portal-modal-content .birthday-row > span,
.portal-modal-content .editor-file > span { flex:1 1 160px; min-width:0; overflow-wrap:anywhere; }
.portal-modal-content .staff-row > span,
.portal-modal-content .staff-row > strong { min-width:0; overflow-wrap:anywhere; }
.notification-inbox-head,.notice-meta { flex-wrap:wrap; }
.portal-image-viewer header > div { display:flex; flex-wrap:wrap; gap:8px; }
.shortcut-tools + #shared-project { margin-top:18px; }
.weather .compact-alerts { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; }
.weather .compact-alerts > p { flex-basis:100%; }
@media (max-width:600px) {
  .quiet-panel { display:grid; grid-template-columns:auto minmax(0,1fr); gap:14px 16px; }
  body .quiet-panel > button.text-button { grid-column:2; justify-self:start; margin:0; }
}
