/* Application review. Keep desktop field placement and use the P1.3 compact editor styles. */
.ar-detail {
  --ar-input-border: #cbd5e5;
  --ar-frame: #dce5f3;
  --ar-ink: #182b4b;
  --ar-label: #52647e;
  --ar-blue: #2857e0;
  width: 100%;
  max-width: 100%;
  max-height: inherit;
  overflow: auto;
  background: #fff;
  color: var(--ar-ink);
  font: inherit;
  font-size: 12px;
  text-align: left;
}

.ar-detail *, .ar-detail *::before, .ar-detail *::after { box-sizing: border-box; }
.ar-detail .ar-detail-form { min-width: 1420px; margin: 0; }
.ar-detail .ar-editor { min-width: 0; padding: 8px 10px; margin: 0; border: 0; }

.ar-detail :is(.ar-title,.ar-bottom) {
  position: sticky;
  left: 0;
  width: min(1680px, calc(100vw - 48px));
  z-index: 1;
}
.ar-detail .ar-title {
  top: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px 25px;
  color: var(--ar-ink);
  background: #f5f8ff;
  border-bottom: 1px solid var(--ar-frame);
  font-size: 17px;
  font-weight: 700;
}
.ar-detail .ar-logo, .ar-detail .ar-window-buttons .ar-button:not([data-app-review-action]) { display: none; }
.ar-detail .ar-window-buttons { display: flex; margin-left: auto; }
.ar-detail .ar-window-buttons .ar-button {
  min-height: 0;
  padding: 4px 8px;
  border: 0;
  background: #f2f5fa;
  color: #7e8da3;
  box-shadow: none;
  font-size: 14px;
}
.ar-detail .ar-window-buttons .ar-button:not(:disabled):hover { background: #e8eef8; }

.ar-detail .ar-tabs {
  display: flex;
  align-items: end;
  gap: 14px;
  min-height: 28px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--ar-frame);
}
.ar-detail .ar-tab {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  margin: 0;
  padding: 4px 0;
  color: #718098;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font: inherit;
  box-shadow: none;
}
.ar-detail .ar-tab-active {
  color: var(--ar-blue);
  border-bottom-color: var(--ar-blue);
  font-weight: 600;
}

.ar-detail .ar-section {
  min-width: 1400px;
  margin: 0 0 6px;
  padding: 0;
  border: 1px solid var(--ar-frame);
  border-radius: 7px;
}
.ar-detail .ar-editor > .ar-section:last-child { margin-bottom: 0; }
.ar-detail .ar-section-heading {
  height: 23px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 10px;
  color: #244b8a;
  background: #eef3ff;
  border-bottom: 1px solid #cbd8ee;
  border-radius: 6px 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.ar-detail .ar-basic { padding: 6px 19px 8px; }
.ar-detail .ar-row { display: grid; align-items: center; min-height: 29px; gap: 7px; }
.ar-detail .ar-b1 { grid-template-columns: 32.1% 14.2% 9% 9.3% 11% 9.4%; }
.ar-detail .ar-b2 { grid-template-columns: 12.1% 7.1% 12% 14.6% 17% 11% minmax(0,1fr); }
.ar-detail .ar-b3 { grid-template-columns: 17.3% 13.5% 4.9% 10.1% 12% 10.8% 10%; }
.ar-detail .ar-b4 { grid-template-columns: 32.1% 34.4%; }

.ar-detail .ar-field, .ar-detail .ar-field > label, .ar-detail .ar-pair, .ar-detail .ar-with-unit {
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
}
.ar-detail .ar-field > label { flex: 1; gap: 0; }
.ar-detail .ar-field > label > span, .ar-detail .ar-area > span, .ar-detail .ar-check {
  flex: none;
  color: var(--ar-label);
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}
.ar-detail .ar-field > label > span { margin-right: 5px; }
.ar-detail .ar-end { justify-content: flex-end; min-width: 0; padding-right: 64px; }
.ar-detail .ar-end .ar-field { flex: 0 0 186px; }
.ar-detail .ar-pair { gap: 7px; }
.ar-detail .ar-pair > .ar-field { flex: 1; }
.ar-detail .ar-with-unit { gap: 2px; white-space: nowrap; }
.ar-detail .ar-with-unit > span { padding-left: 4px; }

.ar-detail .ar-red { font-weight: 400; }
.ar-detail .ar-red::after { content: "*"; margin-left: 3px; color: #d83b4e; font-weight: 500; }
.ar-detail .ar-check { display: flex; align-items: center; gap: 3px; margin: 0; }
.ar-detail :is(input:not([type="checkbox"]),select,textarea) {
  display: block;
  min-width: 0;
  width: 100%;
  height: 26px;
  margin: 0;
  padding: 3px 6px;
  color: #243f68;
  background: #fff;
  border: 1px solid var(--ar-input-border);
  border-radius: 6px;
  box-shadow: none;
  line-height: 18px;
  font-family: inherit;
  font-size: 12px;
}
.ar-detail :is(input[readonly],input:disabled,select:disabled,textarea:disabled) { background: #f3f6fc; color: #64748b; }
.ar-detail :is(input,select,textarea):focus { outline: 2px solid var(--ar-blue); outline-offset: -1px; }
.ar-detail select:not([multiple]) {
  appearance: none;
  padding-block: 0;
  padding-right: 18px;
  line-height: normal;
  background-image: linear-gradient(45deg,transparent 50%,#7c8ca3 50%),linear-gradient(135deg,#7c8ca3 50%,transparent 50%);
  background-size: 4px 4px;
  background-position: calc(100% - 10px) center,calc(100% - 6px) center;
  background-repeat: no-repeat;
}
.ar-detail input[type="checkbox"] { width: 12px; height: 12px; margin: 0; padding: 0; accent-color: var(--ar-blue); }
.ar-detail input[type="hidden"] { display: none; }
.ar-detail textarea { padding: 3px 5px; resize: none; }

.ar-detail .ar-button {
  min-height: 27px;
  margin: 0;
  padding: 3px 8px;
  color: #50617a;
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: 6px;
  box-shadow: none;
  font: inherit;
  white-space: nowrap;
}
.ar-detail .ar-button:hover:not(:disabled) { background: #f5f8ff; border-color: #adc0ed; }
.ar-detail .ar-button:disabled { color: #64748b; opacity: .55; cursor: not-allowed; }
.ar-detail .ar-button.ar-picker {
  align-self: stretch;
  min-height: 0;
  margin-left: 4px;
  min-width: 25px;
  padding: 2px 6px;
  background: #eef3ff;
  border-color: #cbd8ee;
  color: var(--ar-blue);
  box-shadow: none;
  font-size: 11px;
}
.ar-detail .ar-symbol { margin-right: 5px; color: #718098; font-weight: 700; }

.ar-detail .ar-systems { padding-bottom: 3px; }
.ar-detail .ar-system-tabs { margin: 0 4px; overflow-x: auto; }
.ar-detail .ar-system-tabs .ar-tab { white-space: nowrap; }
.ar-detail .ar-systems-body {
  margin: 0 4px;
  padding: 5px 12px 8px;
}
.ar-detail .ar-p1 {
  grid-template-columns: 129px 129px 12.4% 17.5% 13% minmax(90px,7%);
  min-height: 36px;
  margin-bottom: 4px;
}
.ar-detail .ar-p2 { grid-template-columns: 84px 10.8% 12.1% 14.3% 11.1% 13%; }
.ar-detail .ar-p3 { grid-template-columns: 16.5% 17.2% 34.7%; }
.ar-detail .ar-p4 { grid-template-columns: 13.5% 11.2% 6.8% 6.2% 7% max-content 8.1% 7.5%; }
.ar-detail .ar-area { display: flex; align-items: center; gap: 4px; margin: 0; }
.ar-detail .ar-application-scope { width: 77%; margin: 3px 0 14px; }
.ar-detail .ar-application-scope textarea { height: 47px; }
.ar-detail :is(.ar-application-scope,.ar-review-scopes) textarea { overflow-y: auto; }
.ar-detail .ar-review-scopes {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px;
  min-height: 45px;
  margin: 0 -10px 5px;
  padding: 3px 2px 0;
  border-block: 1px solid var(--ar-frame);
}
.ar-detail .ar-review-scopes .ar-area { display: block; }
.ar-detail .ar-review-scopes textarea { height: 22px; padding: 1px 6px; margin-top: 5px; }
.ar-detail .ar-p5 { grid-template-columns: 30.7% 23.8% 10.8% 9%; }
.ar-detail .ar-p6 { grid-template-columns: 11% 118px 43% 89px 117px; }
.ar-detail .ar-p7 { grid-template-columns: 18.7% 57.8%; }
.ar-detail .ar-p8 {
  grid-template-columns: 72px 28.4% repeat(6,minmax(82px,6.6%));
  margin-top: 8px;
}
.ar-detail .ar-p8 .ar-field input { height: 22px; }

.ar-detail .ar-notes {
  display: grid;
  grid-template-columns: minmax(0,1fr) 132px;
  gap: 12px;
  align-items: start;
  padding: 8px 8px 6px;
}
.ar-detail .ar-notes textarea { height: 60px; }
.ar-detail .ar-notes-readonly { grid-template-columns: minmax(0,1fr); }
.ar-detail .ar-save, .ar-detail .ar-save:hover:not(:disabled) {
  min-height: 36px;
  padding: 7px 14px;
  color: #fff;
  border-color: var(--ar-blue);
  border-radius: 7px;
  background: var(--ar-blue);
  font-size: 12px;
  line-height: 1.6;
}
.ar-detail .ar-save > span { display: none; }
.ar-detail .ar-bottom {
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 24px;
  background: #f8fafe;
  border-top: 1px solid var(--ar-frame);
}
.ar-detail .ar-bottom [role="status"] { font-size: 12px; color: var(--ar-label); }
.ar-detail .ar-bottom > button { flex: none; padding: 7px 14px; }
.ar-detail .ar-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(100%);
}

.ar-workspace-dialog.ar-workspace-materials { height: calc(100dvh - 48px); overflow: hidden; }
.ar-detail.ar-material-view { height: 100%; overflow: hidden; }
.ar-detail .ar-material-detail { height: 100%; min-width: 0; display: flex; flex-direction: column; }
.ar-detail .ar-detail-tabs { position: sticky; left: 0; }
.ar-detail .ar-material-detail :is(.ar-title,.ar-material-bottom) {
  position: static;
  flex-shrink: 0;
  width: 100%;
  border-color: var(--line);
}
.ar-detail .ar-material-detail .ar-title { padding: 21px 25px; }
.ar-detail .ar-material-body { flex: 1; min-height: 0; overflow: auto; padding: 24px 25px; }
.ar-detail .ar-material-detail .ar-detail-tabs {
  position: static;
  padding: 0;
  gap: 18px;
  margin: 0 0 13px;
  border-color: var(--line);
}
.ar-detail .ar-material-detail .ar-tab { padding: 8px 2px; }
.ar-detail .ar-material-detail .ar-tab-active { font-weight: 650; color: var(--blue); border-color: var(--blue); }
.ar-detail .ar-material-detail :is(input,select,textarea) {
  height: auto;
  min-height: 0;
  padding: 8px 11px;
  appearance: auto;
  background-image: none;
  border-color: #e0e6f0;
  color: #52647e;
  line-height: 1.55;
}
.ar-detail .ar-material-fields { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.ar-detail .ar-material-note {
  margin: 0 0 14px;
  padding: 12px 15px;
  border-radius: 7px;
  background: #eef3ff;
  color: var(--ar-label);
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.ar-detail .ar-material-section { margin: 0 0 14px; }
.ar-detail .ar-material-section:last-child { margin-bottom: 0; }
.ar-detail .ar-material-fields + .ar-material-section { margin-top: 14px; }
.ar-detail .ar-material-section h2 {
  margin: 0 0 10px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #eef3ff;
  color: #284d88;
  font-size: 12px;
  font-weight: 650;
}
.ar-detail .ar-material-table {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.ar-detail .ar-material-table table { width: 100%; min-width: 680px; border-collapse: collapse; }
.ar-detail .ar-material-table :is(th,td) { padding: 12px 18px; text-align: left; vertical-align: top; }
.ar-detail .ar-material-table thead th {
  border-bottom: 1px solid var(--ar-frame);
  background: #f8fafe;
  color: #8a96aa;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.ar-detail .ar-material-table tbody :is(th,td) { border-bottom: 1px solid #eff2f7; color: #53647d; font-weight: 400; }
.ar-detail .ar-material-table tbody tr:last-child :is(th,td) { border-bottom: 0; }
.ar-detail .ar-material-table :is(input,select) { min-width: 100px; }
.ar-detail .ar-material-summary {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px 18px;
}
.ar-detail :is(.ar-material-summary label,.ar-material-reason) {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #667892;
  font-size: 11px;
}
.ar-detail .ar-material-reason textarea { min-height: 55px; resize: vertical; }
.ar-detail .ar-material-bottom { padding: 15px 25px; background: white; gap: 10px; }
.ar-detail .ar-material-actions > .ar-button { padding: 8px 14px; border-radius: 7px; line-height: 1.6; }
.ar-detail .ar-material-actions > .ar-save {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 3px 8px #2658db17;
}
.ar-detail .ar-material-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.ar-detail .ar-material-bottom [role="status"] { margin-right: auto; }

@media (max-width: 760px) {
  .ar-detail :is(.ar-title,.ar-bottom) { width: calc(100vw - 16px); }
  .ar-detail .ar-title { padding: 15px 12px; }
  .ar-detail .ar-editor { padding-inline: 8px; }
  .ar-detail .ar-bottom { padding: 10px 12px; }
  .ar-workspace-dialog.ar-workspace-materials { height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
  .ar-detail .ar-material-detail .ar-title,
  .ar-detail .ar-material-body,
  .ar-detail .ar-material-detail .ar-material-bottom { padding: 12px; }
  .ar-detail .ar-material-summary { grid-template-columns: minmax(0,1fr); }
  .ar-detail .ar-material-bottom { justify-content: flex-end; flex-wrap: wrap; }
  .ar-detail .ar-material-bottom [role="status"]:empty { display: none; }
  .ar-detail .ar-material-bottom [role="status"] { flex: 0 0 100%; }
}

/* Keep the screenshot's notes and Save visible on short, wide displays. */
@media (min-width: 1420px) and (max-height: 900px) {
  .ar-detail .ar-row { min-height: 26px; }
  .ar-detail .ar-p1 { min-height: 30px; margin-bottom: 2px; }
  .ar-detail .ar-application-scope { margin-bottom: 7px; }
  .ar-detail .ar-review-scopes { margin-bottom: 2px; }
  .ar-detail .ar-p8 { margin-top: 5px; }
  .ar-detail .ar-notes textarea { height: 44px; }
}
