/* Shared action controls. Page styles are loaded before this file. */
body.portal-ui {
  --portal-button-size: 36px;
  --portal-button-radius: 7px;
  --portal-button-focus: #4778bb;
}

body.portal-ui .portal-button,
body.portal-ui .portal-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: var(--portal-button-size);
  min-height: var(--portal-button-size);
  max-width: 100%;
  height: auto;
  padding: 7px 12px;
  border: 1px solid #d5deeb;
  border-radius: var(--portal-button-radius);
  background: #e8edf5;
  color: #245ca8;
  font: 600 14px/20px Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

body.portal-ui .portal-button:visited { color: #245ca8; }
body.portal-ui .portal-button:hover { background: #dce6f3; border-color: #c4d1e3; text-decoration: none; }
body.portal-ui .portal-button:active { background: #d0def0; }
body.portal-ui .portal-button.primary { background: #245ca8; border-color: #245ca8; color: #fff; }
body.portal-ui .portal-button.primary:hover { background: #1e4e90; border-color: #1e4e90; }
body.portal-ui .portal-button.primary:active { background: #19437d; }
body.portal-ui .portal-button.confirm { background: #ebf7ef; border-color: #1c713f; color: #1c713f; }
body.portal-ui .portal-button.confirm:hover { background: #dff0e5; border-color: #175e34; }
body.portal-ui .portal-button.confirm:active { background: #d1e8da; }
body.portal-ui .portal-button .portal-navigation-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff3f2;
  color: #b42318;
}
body.portal-ui .portal-button .portal-navigation-warning svg { flex-basis: 16px; }
body.portal-ui .portal-button.quiet,
body.portal-ui .portal-button.tool { background: #f7f9fc; border-color: #d8e0eb; color: #38557a; }
body.portal-ui .portal-button.quiet:hover,
body.portal-ui .portal-button.tool:hover { background: #eaf0f8; border-color: #bccce0; }
body.portal-ui .portal-button.cancel { background: #fceeee; border-color: #eac3c3; color: #9b3535; }
body.portal-ui .portal-button.cancel:hover { background: #f8dddd; border-color: #dbacac; }
body.portal-ui .portal-button.cancel:active { background: #f3d2d2; }
body.portal-ui .portal-button.danger { background: #ad3338; border-color: #ad3338; color: #fff; }
body.portal-ui .portal-button.danger:hover { background: #932a30; border-color: #932a30; }
body.portal-ui .portal-button.danger:active { background: #7d2228; }
body.portal-ui .portal-button[aria-pressed="true"] { background: #dce6f3; border-color: #8da9ce; color: #193e70; }
body.portal-ui .portal-button[aria-expanded="true"],
body.portal-ui .portal-button.case-column-filter--active { background: #e8f0fc; border-color: #9eb9dd; color: #245ca8; }
body.portal-ui .portal-button:focus-visible { outline: 3px solid var(--portal-button-focus); outline-offset: 3px; }
body.portal-ui .portal-button:disabled,
body.portal-ui .portal-button[aria-disabled="true"] { opacity: .55; cursor: default; }
body.portal-ui .portal-button[aria-busy="true"],
body.portal-ui .updates-more[aria-disabled="true"] { cursor: wait; }
body.portal-ui .portal-button[hidden] { display: none !important; }
body.portal-ui .portal-button svg { display: block; flex: 0 0 16px; width: 16px; height: 16px; }
body.portal-ui .portal-button.tool {
  flex: 0 0 var(--portal-button-size);
  width: var(--portal-button-size);
  height: var(--portal-button-size);
  padding: 0;
}
body.portal-ui .portal-button.button-block { width: 100%; }
body.portal-ui .button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
body.portal-ui .button-row form { margin: 0; }
body.portal-ui .tariff-page { --tariff-info-width: var(--portal-button-size); }
body.portal-ui .case-sort-segments { gap: 4px; border: 0; }
body.portal-ui .case-sort-segments .portal-button { border-radius: var(--portal-button-radius); }
body.portal-ui .case-created-column { min-width: 140px; }
body.portal-ui .case-list table { min-width: 1200px; }
body.portal-ui .case-list [data-case-sort-header="agent"],
body.portal-ui .case-list tbody td:nth-child(2) { min-width: 180px; }
body.portal-ui .case-list [data-case-sort-header="lawyer"],
body.portal-ui .case-list tbody td:nth-child(3) { min-width: 220px; }
body.portal-ui .case-list .case-open-link { min-width: 88px; white-space: nowrap; overflow-wrap: normal; }
body.portal-ui .case-open-column { min-width: 112px; }
body.portal-ui .case-list [data-case-sort-header="branch"],
body.portal-ui .case-list tbody td:nth-child(4) { min-width: 144px; }
body.portal-ui .case-list [data-case-filter-label] { white-space: nowrap; overflow-wrap: normal; }
body.portal-ui .case-list .case-number-cell { min-width: 132px; }

body.portal-ui input[type="file"]::file-selector-button,
body.portal-ui .upload-page .field input[type="file"]::file-selector-button {
  min-height: var(--portal-button-size);
  padding: 7px 12px;
  margin-right: 8px;
  border: 1px solid #d5deeb;
  border-radius: var(--portal-button-radius);
  background: #e8edf5;
  color: #245ca8;
  font: 600 14px/20px Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
}
body.portal-ui input[type="file"]::file-selector-button:hover { background: #dce6f3; }
body.portal-ui input[type="file"]:disabled::file-selector-button { opacity: .55; cursor: default; }

@media (any-pointer: coarse), (max-width: 650px) {
  body.portal-ui { --portal-button-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  body.portal-ui .portal-button { transition: none; }
}
