/*
====================================================
DoseClock Utility Styles
Phase 4 Package 4
Shared page structure, spacing helpers, action bars, empty states
====================================================
*/

.page-shell,
.page-container {
  width: min(1180px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.page-header,
.page__header {
  margin-bottom: 1.5rem;
}

.page-title,
.page__title {
  margin-bottom: 0.35rem;
  color: var(--color-heading);
}

.page-subtitle,
.page__subtitle,
.page-help,
.page__help {
  max-width: 75ch;
  color: var(--color-muted, #5f6b7a);
}

.section-stack {
  display: grid;
  gap: 1.25rem;
}

.section-card {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.section-card--soft {
  background: #f8fbff;
}

.action-bar,
.page-actions,
.form-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.action-bar--right,
.page-actions--right,
.form-actions--right {
  justify-content: flex-end;
}

.action-bar--between,
.page-actions--between {
  justify-content: space-between;
}

.empty-state {
  padding: 1.25rem;
  border: 1px dashed rgba(10, 45, 111, 0.28);
  border-radius: var(--radius-lg);
  background: #f8fbff;
  color: var(--color-muted, #5f6b7a);
}

.empty-state__title {
  margin-bottom: 0.35rem;
  color: var(--color-heading);
  font-weight: 700;
}

.meta-line,
.help-text,
.small-muted {
  color: var(--color-muted, #5f6b7a);
  font-size: 0.95rem;
}

.divider {
  height: 1px;
  margin: 1.25rem 0;
  background: var(--color-border);
  border: 0;
}

.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .page-shell,
  .page-container {
    width: min(100%, calc(100% - 1rem));
  }

  .action-bar,
  .page-actions,
  .form-actions,
  .button-row {
    align-items: stretch;
  }

  .action-bar > *,
  .page-actions > *,
  .form-actions > *,
  .button-row > * {
    width: 100%;
  }
}
