@import url('./loan-tools/loan-document-actions.css');

.loan-documents-dialog {
  width: min(510px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 16px;
  border: 1px solid #c7d7e6;
  border-radius: 14px;
  background: #fff;
  color: #153857;
  box-shadow: 0 14px 44px #102c4e33;
}

.loan-documents-dialog::backdrop { background: #142b455e; }
.loan-documents-dialog > .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.loan-documents-dialog h2 { margin: 0; font-size: 1.15rem; }
.loan-documents-dialog p { margin: 7px 0; font-size: 13px; }
.loan-documents-dialog [role="status"]:empty { display: none; }
.loan-documents-dialog form { gap: 7px; margin-top: 10px; }
.loan-documents-dialog label { gap: 4px; font-size: 13px; }
.loan-documents-dialog input,
.loan-documents-dialog select {
  min-height: 35px;
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #bacbdd;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font: inherit;
}

.loan-documents-dialog button { min-height: 35px; padding: 5px 9px; font-size: 12px; background: #245f85; }
.loan-documents-dialog .quiet { background: #edf3f7; color: #153857; }
.loan-documents-dialog details { margin: 0; padding: 9px; }
.loan-documents-dialog details > label { margin-top: 7px; }
.loan-documents-dialog .sheet-actions,
.shared-loan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.loan-documents-dialog .sheet-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  padding: 5px 7px;
  color: #245f85;
  font-size: 12px;
  font-weight: 650;
}

.shared-loan-dialog .loan-report-search { margin: 9px 0; padding: 8px; font-size: 12px; }
.shared-loan-dialog .loan-report-search form { padding-top: 8px; }

/* The checkout keeps the same quiet frame through its three short steps. */
.shared-loan-dialog[data-checkout-step],
.hub-pilot .loan-documents-dialog.loan-checkout-contract {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(465px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 18px;
  border-radius: 14px 0 0 14px;
  background: #fff;
  color: #18364b;
}
.shared-loan-dialog[data-checkout-step] .shared-loan-heading { margin-bottom: 12px; }
.shared-loan-dialog[data-checkout-step] .shared-loan-heading h2,
.loan-checkout-contract h2 { color: #18364b; font-size: 21px; }
.loan-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: #677b89;
  font: 500 12px/1.4 system-ui, sans-serif;
}
.loan-progress li { padding: 9px 0; border-bottom: 2px solid #e6edf1; }
.loan-progress [aria-current="step"] { color: #183f5b; border-color: #245f85; font-weight: 750; }
.shared-loan-dialog[data-checkout-step] .fleet-vehicle-identity {
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 0 14px;
  border: 0;
  border-bottom: 1px solid #e3ebf0;
  border-radius: 0;
}
.shared-loan-dialog[data-checkout-step] .fleet-photo { width: 78px; height: 60px; }
.shared-loan-dialog[data-checkout-step] .fleet-vehicle-copy small { display: none; }
.shared-loan-dialog[data-checkout-step] .fleet-vehicle-copy strong { color: #183f5b; font-size: 23px; }
.shared-loan-dialog[data-checkout-step] .fleet-vehicle-copy h3 { font-size: 14px; }
.shared-loan-dialog[data-checkout-step] .fleet-vehicle-copy p { font-size: 12px; }
.shared-loan-dialog[data-checkout-step] .loan-essential-fields { gap: 12px; border: 0; border-radius: 0; padding: 0; }
.shared-loan-dialog[data-checkout-step] .loan-essential-fields > legend { display: none; }
.shared-loan-dialog[data-checkout-step] .loan-primary { margin: 8px 0 0; min-height: 40px; font-size: 14px; }
.shared-loan-dialog[data-checkout-step] .loan-session-note { margin-top: 10px; color: #586d7c; font-size: 11px; }
.shared-loan-dialog .loan-checkout-summary { display: grid; gap: 5px; padding: 4px 0 10px; }
.shared-loan-dialog .loan-checkout-summary strong { font-size: 18px; }
.shared-loan-dialog .loan-checkout-summary span { color: #405c6e; font-size: 14px; }
.shared-loan-dialog .loan-contract-receipt { margin: 0; padding: 9px 11px; border-radius: 7px; background: #eef7f1; color: #216044; font-size: 12px; overflow-wrap: anywhere; }
.shared-loan-dialog .loan-contract-receipt[data-filed="false"] { background: #fff8e5; color: #795a15; }
.shared-loan-dialog .loan-modify { justify-self: start; padding: 0; background: transparent; color: #245f85; font-size: 12px; text-decoration: underline; }
.loan-checkout-contract > .row { margin-bottom: 10px; }
.loan-checkout-contract .loan-checkout-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.loan-checkout-contract .loan-checkout-actions > button:last-child { flex: 1; min-height: 40px; }
.loan-checkout-contract .loan-checkout-actions > .quiet { background: transparent; text-decoration: underline; }
.shared-loan-dialog .loan-known-client { display: grid; gap: 3px; margin-bottom: 10px; padding: 10px 12px; background: #f5f8fa; border-radius: 8px; }
.shared-loan-dialog .loan-known-client strong { font-size: 15px; }
.shared-loan-dialog .loan-known-client span { color: #456278; font-size: 12px; }
.shared-loan-dialog .loan-division-choice { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.shared-loan-dialog .loan-division-choice legend { margin-bottom: 7px; color: #36576e; font-size: 12px; }
.shared-loan-dialog .loan-division-choice label { grid-column: auto; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid #c8d6e0; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 650; }
.shared-loan-dialog .loan-division-choice label:first-of-type { grid-column: auto; }
.shared-loan-dialog[data-checkout-step] .loan-essential-fields > label { grid-column: 1 / -1; }
.shared-loan-dialog .loan-division-choice input { flex: 0 0 16px; width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: #245f85; }
.shared-loan-dialog .loan-division-choice label:has(input:focus-visible) { outline: 2px solid #25739e; outline-offset: 2px; }
.shared-loan-dialog .loan-division-choice [data-division="dauteuil"]:has(input:checked) { background: #f2edf8; border-color: #8a67ae; color: #624184; }
.shared-loan-dialog .loan-division-choice [data-division="sf"]:has(input:checked) { background: #fff2eb; border-color: #b45b3d; color: #8b3d27; }
.shared-loan-dialog .loan-modify { border: 0; border-radius: 0; }
.loan-checkout-contract .loan-primary { min-height: 40px; }
.loan-checkout-contract .loan-checkout-actions > .quiet { border: 0; }
