/* Shared action buttons. Clickable cards and data cells keep their own layout. */
@media screen {
  :root {
    --action-blue: var(--prima-blue,#055c9d);
    --action-green: #187647;
    --action-red: #b42318;
    --action-purple: #7036b5;
  }

  /* The radius also covers page-specific and dynamically inserted actions. */
  button:not(:where(.contract-action, .customer, #incompleteButton,
    .progress-kpi, .progress-month-bar, .evening-history-item,
    .evening-quantity, .calendar-request-row, .macro-offer-button,
    .app-nav-btn, .mobile-nav-btn, .mobile-sheet-item,
    .dd-breakdown-metric, .dd-breakdown-link, .dd-operation-link, .dd-network-card-link)),
  .btn, .button, a.primary, input[type="submit"], input[type="button"] {
    border-radius: 7px !important;
  }

  html body :is(.btn, .button, .mini-btn, #refresh, #refreshSales,
    #cancelReading, .contract-methods button, .review-actions button,
    .archive-actions button, .login button:not(.reveal),
    .booking-card .primary, #retry-load) {
    --action-ink: var(--action-blue);
    --action-fill: var(--prima-screen-surface,#fff);
    --action-border: var(--action-blue);
    color: var(--action-ink);
    background: var(--action-fill);
    border: 1.5px solid var(--action-border);
    box-shadow: none;
    font-weight: 400;
    text-decoration: none;
    transition: filter .16s ease, background-color .16s ease;
  }

  html body :is(.btn, .button, .mini-btn, #refresh, #refreshSales,
    #cancelReading, .contract-methods button, .review-actions button,
    .archive-actions button, .login button:not(.reveal),
    .booking-card .primary, #retry-load):is(.btn-primary, .btn-dark,
    .primary, .submit, [id$="Upload"]) {
    --action-fill: var(--action-blue);
    --action-ink: #fff;
  }

  html body :is(.btn, .button, .mini-btn, #refresh, #refreshSales,
    #cancelReading, .contract-methods button, .review-actions button,
    .archive-actions button, .login button:not(.reveal),
    .booking-card .primary, #retry-load):is(.btn-success) {
    --action-fill: var(--action-green);
    --action-border: var(--action-green);
    --action-ink: #fff;
  }

  html body :is(.btn, .button, .mini-btn, #refresh, #refreshSales,
    #cancelReading, .contract-methods button, .review-actions button,
    .archive-actions button, .login button:not(.reveal),
    .booking-card .primary, #retry-load):is(.btn-danger, .btn-danger-soft,
    .danger, .delete) {
    --action-fill: #fff5f4;
    --action-border: var(--action-red);
    --action-ink: var(--action-red);
  }

  html body :is(.btn, #saveModelBtn).save-model-btn {
    --action-fill: #faf5ff;
    --action-border: var(--action-purple);
    --action-ink: var(--action-purple);
  }

  /* Recovery actions sit on the dark navigation background. */
  html body :is(#sharedRetry, #sharedRecovery, #sharedResolve) {
    --action-fill: var(--prima-screen-surface,#fff);
    --action-border: #b8d8f7;
    --action-ink: var(--prima-blue,#055c9d);
  }

  html body :is(.btn, .button, .mini-btn, #refresh, #refreshSales,
    #cancelReading, .contract-methods button, .review-actions button,
    .archive-actions button, .login button:not(.reveal),
    .booking-card .primary, #retry-load):hover:not(:disabled) {
    color: var(--action-ink);
    background: var(--action-fill);
    border-color: var(--action-border);
    box-shadow: none;
    filter: brightness(.94);
    transform: none;
  }

  :is(button, .btn, .button, a.primary):focus-visible {
    outline: 3px solid var(--prima-focus,#83b8e0);
    outline-offset: 3px;
  }
}
