:root {
  --gold: #b86a18;
  --gold-dark: #9a5510;
  --ink: #111111;
  --muted: #666666;
  --line: #c8c8c8;
  --cream: #f5f1ea;
  --paper: #ffffff;
  --focus: #fff8ec;
  --page-width: 816px;
  --page-height: 1056px;
}

* { box-sizing: border-box; }
html { background: #ececec; }
body {
  margin: 0;
  color: var(--ink);
  background: #ececec;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
}

.form-shell { padding: 22px 12px 40px; }
#quote-form { margin: 0; }

.sheet {
  position: relative;
  width: min(100%, var(--page-width));
  margin: 0 auto 24px;
  padding: 35px 36px 70px;
  background: var(--paper);
  box-shadow: 0 3px 18px rgba(0,0,0,.10);
  border-radius:20px;
}

.pdf-header {
    height: 94px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    background: #101010;
    border-radius: 10px;
    overflow: hidden;
    padding: 10px 20px;
}
.brand-logo {
  display: block;
  background: #000;
}
.form-title {
  padding: 5px 6px 0 12px;
  color: #fff;
  font-size: 15px;
  line-height: 1.28;
  font-weight: 700;
  text-align: right;
}
.intro {
  margin: 0 0 8px 8px;
  color: #555;
  font-size: 11px;
  line-height: 1.25;
}
.section-title {
  margin: 0 0 7px 8px;
  color: var(--gold);
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
}
.section-title-spaced { margin-top: 11px; }
.home-title { margin-top: 11px; }
.required { color: #9f1d1d; }

button, input, textarea, select { font: inherit; }
input, textarea, select {
  width: 100%;
  height: 100%;
  min-height: 32px;
  border: 0;
  outline: 0;
  padding: 6px 7px;
  color: #111;
  background: #F1F4FF;
  resize: none;
}
select {
  appearance: auto;
  cursor: pointer;
}
input:focus, textarea:focus, select:focus {
  background: var(--focus);
  box-shadow: inset 0 0 0 1px #d8a96d;
}
input::placeholder { color: #aaa; }

.money-field {
  display: flex;
  align-items: center;
  height: 100%;
  background: #f1f4ff;
}
.money-field > span {
  flex: 0 0 auto;
  padding-left: 8px;
  color: #777;
}
.money-field input { padding-left: 4px; }

.address-row {
  display: grid;
  grid-template-columns: 1fr 116px;
  height: 100%;
}
.address-row select {
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.two-col-form,
.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.two-col-form th,
.two-col-form td,
.data-table th,
.data-table td {
  border: 1px solid #adadad;
}
.two-col-form th {
  width: 30%;
  height: 35px;
  padding: 4px;
  font-size: 11px;
  line-height: 1.23;
  text-align: left;
  vertical-align: top;
  font-weight: 700;
}
.two-col-form td {
  height: 35px;
  padding: 0;
  vertical-align: middle;
}
.two-col-form tr.tall th,
.two-col-form tr.tall td { height: 51px; }
.two-col-form tr.taller th,
.two-col-form tr.taller td { height: 66px; }
.two-col-form tr.tall-xl th,
.two-col-form tr.tall-xl td { height: 65px; }
.half-label th { width: 50%; }

.table-caption {
  margin: 8px 0 6px 8px;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}
.vehicle-caption { margin-top: 10px; }

.data-table th {
  height: 31px;
  padding: 5px 3px;
  background: var(--cream);
  font-size: 9px;
  line-height: 1.15;
  text-align: left;
  vertical-align: top;
  font-weight: 700;
}
.data-table td { height: 31px; padding: 0; }
.data-table td input {
  min-height: 29px;
  padding: 3px 4px;
  font-size: 9px;
}

.drivers-table th:nth-child(1) { width: 14.5%; }
.drivers-table th:nth-child(2) { width: 12%; }
.drivers-table th:nth-child(3) { width: 15%; }
.drivers-table th:nth-child(4) { width: 7.5%; }
.drivers-table th:nth-child(5) { width: 12%; }
.drivers-table th:nth-child(6) { width: 17%; }
.drivers-table th:nth-child(7) { width: 22%; }

.vehicles-table th:nth-child(1) { width: 16%; }
.vehicles-table th:nth-child(2) { width: 16%; }
.vehicles-table th:nth-child(3) { width: 9%; }
.vehicles-table th:nth-child(4) { width: 31%; }
.vehicles-table th:nth-child(5) { width: 13%; }
.vehicles-table th:nth-child(6) { width: 15%; }

.page-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 27px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

/* Page 2 */
.page-two { padding-top: 35px; }
.auto-extra th { width: 29.2%; }
.home-form th, .home-final-form th { width: 29.2%; }
.home-lower-form { margin-top: -1px; }
.home-final-form { margin-top: -1px; }
.claims-caption { margin-top: 8px; margin-bottom: 5px; }
.claims-table th:nth-child(1), .claims-table td:nth-child(1) { width: 16%; }
.claims-table th:nth-child(2), .claims-table td:nth-child(2) { width: 28%; }
.claims-table th:nth-child(3), .claims-table td:nth-child(3) { width: 39%; }
.claims-table th:nth-child(4), .claims-table td:nth-child(4) { width: 17%; }
.page-two-claims td { height: 33px; }

/* Page 3 */
.page-three { padding-top: 35px; }
.claims-continuation td { height: 33px; }

.authorization-box {
  margin-top: 0;
  min-height: 74px;
  padding: 7px 8px 8px;
  border: 1px solid var(--gold);
  background: #f8f4ed;
}
.authorization-box h2 {
  margin: 0 0 3px;
  color: var(--gold);
  font-size: 12px;
  line-height: 1;
}
.authorization-box p {
  margin: 0;
  font-size: 10px;
  line-height: 1.35;
}

.signature-date-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr);
  gap: 20px;
  margin-top: 18px;
  align-items: end;
}
.signature-label,
.date-field > span {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 700;
}
.signature-pad-wrap {
  position: relative;
  height: 82px;
  border-bottom: 1px solid #111;
  background:
    linear-gradient(to bottom, rgba(184,106,24,.035), rgba(184,106,24,.01));
}
#signature-canvas {
  display: block;
  width: 100%;
  height: 82px;
  touch-action: none;
  cursor: crosshair;
}
.clear-signature {
  position: absolute;
  right: 4px;
  top: 4px;
  width: auto;
  min-width: 48px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #c4c4c4;
  border-radius: 3px;
  color: #555;
  background: rgba(255,255,255,.92);
  cursor: pointer;
  font-size: 9px;
}
.clear-signature:hover { border-color: var(--gold); color: var(--gold-dark); }
.signature-hint {
  margin-top: 4px;
  color: #777;
  font-size: 9px;
}
.date-field input {
  height: 38px;
  min-height: 38px;
  padding: 5px 1px 2px;
  border-bottom: 1px solid #111;
}

.notes-wrap { margin-top: 17px; }
.notes-wrap label {
  display: block;
  font-size: 10px;
  font-weight: 700;
}
.notes-wrap textarea {
  display: block;
  height: 73px;
  margin-top: -1px;
  padding: 7px 2px;
  border-top: 1px solid #111;
  border-bottom: 1px solid #111;
}

.web-actions {
    width: min(100%, var(--page-width));
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    background: #fff;
    box-shadow: 0 3px 18px rgba(0,0,0,.10);
    border-radius: 15px;
}
.web-actions button {
  min-width: 240px;
  border: 1px solid var(--gold-dark);
  border-radius: 3px;
  padding: 13px 24px;
  color: #fff;
  background: var(--gold);
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
}
.web-actions button:hover { background: var(--gold-dark); }
.web-actions button:disabled { opacity: .55; cursor: wait; }
.web-actions p { margin: 8px 0 0; color: #666; font-size: 10px; }

.form-status {
  display: none;
  width: min(100%, var(--page-width));
  margin: 0 auto 16px;
  padding: 12px 15px;
  border: 1px solid;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.form-status.success {
  display: block;
  border-color: #2f7d32;
  color: #246227;
  background: #eff9ef;
}
.form-status.error {
  display: block;
  border-color: #a72e2e;
  color: #8b2424;
  background: #fff0f0;
}

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

/* Browser date controls need more room in dense tables */
.data-table input[type="date"] {
  font-size: 8px;
  padding-left: 2px;
  padding-right: 2px;
}

@media (max-width: 860px) {
  .form-shell { padding: 0; }
  .sheet {
    margin: 0 auto 14px;
    min-height: auto;
    padding: 20px 16px 38px;
    box-shadow: none;
  }
  .pdf-header { height: 82px; }
  .brand-logo { width: 90px; height: 82px; }
  .form-title { font-size: 14px; }
  .two-col-form th { width: 38%; }
  .auto-extra th, .home-form th, .home-final-form th { width: 38%; }
  .half-label th { width: 52%; }
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .drivers-table { min-width: 820px; }
  .vehicles-table { min-width: 680px; }
  .claims-table { min-width: 680px; }
  .page-footer { position: static; margin-top: 34px; }
  .web-actions { box-shadow: none; }
}

@media (max-width: 620px) {
  body { font-size: 11px; }
  .sheet { padding-left: 10px; padding-right: 10px; }
  .intro { margin-left: 2px; font-size: 10px; }
  .section-title, .table-caption { margin-left: 2px; }
  .two-col-form th { width: 43%; font-size: 10px; }
  .auto-extra th, .home-form th, .home-final-form th { width: 43%; }
  .address-row { grid-template-columns: 1fr; }
  .address-row select { border-left: 0; border-top: 1px solid var(--line); }
  .signature-date-layout { grid-template-columns: 1fr; gap: 14px; }
}

@media print {
  @page { size: Letter; margin: 0; }
  html, body { background: #fff; }
  body { margin: 0; }
  .form-shell { padding: 0; }
  .sheet {
    width: 8.5in;
    min-height: 11in;
    height: 11in;
    margin: 0;
    padding: 0.365in 0.375in 0.72in;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
  }
  .sheet:last-of-type { page-break-after: auto; break-after: auto; }
  .web-actions, .form-status, .clear-signature, .signature-hint { display: none !important; }
  .page-footer { bottom: .28in; }
  input, textarea, select { -webkit-appearance: none; appearance: none; }
}
