/*
 * Byggspor screen readability pass.
 *
 * Legacy text tokens are raised in design-tokens.css. This layer protects the
 * most important interactive controls and keeps only explicitly quiet diary
 * attribution below the general 10 px minimum.
 */

/* Actions and choice controls must remain readable even inside compact parents. */
:where(button, select, summary, [role="button"], .btn, .button) {
  font-size: max(var(--bs-text-12), 1em);
}

/* The primary personnel action called out in the shift-plan review. */
.shift-grid-add-personnel {
  height: 36px;
  padding-inline: 14px;
  font-size: var(--bs-text-12);
  line-height: 1.2;
}

/* Compact shift-plan controls need both legible labels and usable hit areas. */
.shift-worker-actions button,
.shift-worker-actions summary,
.shift-project-admin-actions button,
.shift-project-admin-actions summary {
  min-height: 34px;
  padding-inline: 10px;
  font-size: var(--bs-text-12);
}

.shift-subtabs button,
.shift-config-actions button,
.settings-summary-action {
  min-height: 36px;
  font-size: var(--bs-text-12);
}

.shift-directory-toolbar input,
.shift-directory-toolbar select,
.shift-add-to-shift select,
.platform-feedback-actions select,
.platform-feedback-row header select,
.settings-access-fields select {
  min-height: 38px;
  font-size: var(--bs-text-12);
}

/* Quiet provenance stays visually secondary by design. */
.diary-field-meta,
.diary-section .diary-field-meta,
.diary-history-item header span {
  font-size: var(--bs-text-quiet-8-5);
}

/* Standard 1: calm vertical navigation for diary and settings. */
.diary-month-group {
  overflow: hidden;
  border-color: #dbe4e7;
  border-radius: 8px;
  background: #fff;
}

.diary-month-summary,
.diary-month-group[open] > .diary-month-summary {
  min-height: 44px;
  padding-inline: 12px;
  border-bottom-color: #e4eaec;
  background: #fff;
  color: var(--navy);
}

.diary-month-summary strong {
  font-size: var(--bs-text-14);
  font-weight: 600;
  letter-spacing: 0;
}

.diary-month-summary small {
  color: #71828a;
  font-size: var(--bs-text-12);
  font-weight: 500;
}

.diary-month-days {
  gap: 2px;
  padding: 5px;
}

.diary-month-days .day-item,
.diary-month-days .day-item strong {
  font-size: var(--bs-text-14);
  font-weight: 550;
  letter-spacing: 0;
}

.diary-month-days .day-item {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #536a75;
}

.diary-month-days .day-item:hover {
  background: #f2f6f5;
  color: var(--navy);
}

.diary-month-days .day-item.active {
  padding-left: 15px;
  background: #eaf5f0;
  color: var(--navy);
  box-shadow: inset 3px 0 #299267;
}

@media (min-width: 761px) {
  .settings-section-nav,
  .platform-settings-nav {
    gap: 3px;
    padding: 14px 12px;
  }

  .settings-nav-intro {
    gap: 5px;
    margin-bottom: 6px;
    padding: 8px 10px 14px;
  }

  .settings-nav-intro strong {
    font-size: var(--bs-text-15);
    font-weight: 600;
  }

  .settings-nav-intro small {
    font-size: var(--bs-text-12);
    font-weight: 450;
    line-height: 1.45;
  }

  .settings-nav-group {
    margin: 14px 11px 5px;
    color: #71828a;
    font-size: var(--bs-text-12);
    font-weight: 600;
    letter-spacing: .025em;
  }

  .settings-section-nav button,
  .platform-settings-nav button {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 46px;
    padding: 8px 11px;
    border-left-width: 3px;
    border-radius: 7px;
    color: #405966;
    font-size: var(--bs-text-14);
    font-weight: 550;
    line-height: 1.35;
  }

  .settings-nav-icon {
    width: 28px;
    height: 28px;
    font-size: var(--bs-text-12);
    font-weight: 650;
  }

  .settings-nav-count {
    font-size: var(--bs-text-11);
    font-weight: 600;
  }
}

/* Standard 2: underline tabs for sibling views in the shift-plan module. */
.shift-view-tabs,
.shift-subtabs {
  display: flex;
  width: 100%;
  max-width: 100%;
  gap: 0;
  overflow-x: auto;
  margin-bottom: 18px;
  padding: 0;
  border-bottom: 1px solid #d8e1e4;
  border-radius: 0;
  background: transparent;
  scrollbar-width: thin;
}

.shift-view-tabs button,
.shift-subtabs button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #5b707a;
  font-size: var(--bs-text-14);
  font-weight: 550;
  line-height: 1.3;
  box-shadow: none;
}

.shift-view-tabs button:hover,
.shift-subtabs button:hover {
  background: #f5f8f7;
  color: var(--navy);
}

.shift-view-tabs button.active,
.shift-subtabs button.active {
  border-bottom-color: #299267;
  background: transparent;
  color: var(--navy);
  box-shadow: none;
}

/* The order description must fit real item lists without feeling compressed. */
#orderDescription {
  min-height: 150px;
  padding: 13px 14px;
  font-size: var(--bs-text-14);
  line-height: 1.65;
  resize: vertical;
}

/* Shared tactile feedback for file-picker labels and upload controls. */
:is(.upload-btn,label:has(>input[type="file"]),button[data-file-upload]){transition:transform 100ms ease,filter 100ms ease}
:is(.upload-btn,label:has(>input[type="file"]),button[data-file-upload]):active{transform:translateY(1px) scale(.98);filter:brightness(.94)}
@media(prefers-reduced-motion:reduce){:is(.upload-btn,label:has(>input[type="file"]),button[data-file-upload]){transition:none}:is(.upload-btn,label:has(>input[type="file"]),button[data-file-upload]):active{transform:none}}
