/* Lease application: light "paper" form (client feedback: dark fields were hard to fill in).
   Everything is scoped to .apply-light so the other pages keep the dark glass fields.
   The !important flags are needed to beat site.css and Tailwind's forms plugin. */
.apply-light { background: #ebeced; color: #1d1f20; }
.apply-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 18px 32px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.1);
}
@media (min-width: 768px) { .apply-card { padding: 52px 56px 48px; } }

.apply-light form { display: flex; flex-direction: column; gap: 44px; }
.apply-light fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.apply-light [hidden] { display: none !important; }

.apply-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e3e4e6;
  font: 800 13px/1.2 'Inter', sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c4001d;
}
.apply-tag {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #5f6368;
  background: #f1f2f3;
}
.apply-hint { margin: -10px 0 20px; font-size: 14px; line-height: 1.55; color: #5f6368; }
.apply-opt { margin-left: 6px; font-weight: 600; letter-spacing: 0.04em; text-transform: none; color: #8a8f95; }

.apply-grid { display: grid; grid-template-columns: 1fr; gap: 18px 20px; }
.apply-grid + .apply-grid,
.apply-grid + .apply-choice,
.apply-choice + .apply-grid { margin-top: 18px; }
.apply-grid-city { grid-template-columns: 1fr 1fr; }
.apply-grid-city > :first-child { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .apply-grid-2 { grid-template-columns: 1fr 1fr; }
  .apply-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .apply-grid-city { grid-template-columns: 2fr 1fr 1.2fr; }
  .apply-grid-city > :first-child { grid-column: auto; }
  .apply-full { grid-column: 1 / -1; }
}

/* ---- fields ---- */
.apply-light .afg-label {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #3a3d40;
  margin-bottom: 7px;
}
.apply-light .afg-input,
.apply-light .afg-select {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px !important;
  border-radius: 6px !important;
  border: 1px solid #c4c8cd !important;
  background-color: #fff !important;
  color: #141618 !important;
  font: 400 16px/1.4 'Inter', sans-serif !important;
  font-style: normal !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  color-scheme: light;
}
.apply-light .afg-input::placeholder { color: #9a9ea4 !important; opacity: 1; }
.apply-light .afg-input:hover,
.apply-light .afg-select:hover { border-color: #9da2a8 !important; }
.apply-light .afg-input:focus,
.apply-light .afg-select:focus {
  outline: none;
  border-color: #E60023 !important;
  box-shadow: 0 0 0 3px rgba(230, 0, 35, 0.15) !important;
}
.apply-light .afg-input:user-invalid,
.apply-light .afg-select:user-invalid { border-color: #d93025 !important; background-color: #fff8f7 !important; }
.apply-light .afg-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235f6368'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 18px !important;
}
.apply-light input[type="file"].afg-input { padding: 8px !important; cursor: pointer; }
.apply-light input[type="file"].afg-input::file-selector-button,
.apply-light input[type="file"].afg-input::-webkit-file-upload-button {
  margin-right: 12px;
  padding: 9px 16px;
  border: 0;
  border-radius: 4px;
  background: #E60023;
  color: #fff;
  box-shadow: none;
  font: 700 12px/1 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.apply-unit { position: relative; }
.apply-unit > span {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #8a8f95;
  pointer-events: none;
}
.apply-unit input + span { right: 14px; }

/* ---- big choice tiles (personal / business) ---- */
.apply-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.apply-segment label { position: relative; cursor: pointer; }
.apply-segment input,
.apply-pill input,
.apply-switch input { position: absolute; opacity: 0; pointer-events: none; }
.apply-segment label > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  border: 1.5px solid #d5d8dc;
  border-radius: 10px;
  font: 800 14px/1.2 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2a2d30;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.apply-segment label > span small { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #6b7076; }
.apply-segment .material-symbols-outlined { font-size: 28px; }
.apply-segment input:checked + span { border-color: #E60023; background: #fff3f5; color: #b8001c; }
.apply-segment input:focus-visible + span,
.apply-pill input:focus-visible + span,
.apply-switch input:focus-visible + .track { outline: 2px solid #E60023; outline-offset: 2px; }

/* ---- pill radios (housing) ---- */
.apply-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.apply-pill { position: relative; cursor: pointer; }
.apply-pill > span {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  border: 1px solid #c4c8cd;
  border-radius: 999px;
  font: 600 15px/1.2 'Inter', sans-serif;
  color: #2a2d30;
  background: #fff;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.apply-pill:hover > span { border-color: #9da2a8; }
.apply-pill input:checked + span { border-color: #E60023; background: #fff3f5; color: #b8001c; box-shadow: inset 0 0 0 1px #E60023; }

/* ---- co-signer switch + panel ---- */
.apply-switch { display: inline-flex; align-items: center; gap: 14px; cursor: pointer; font: 700 16px/1.3 'Inter', sans-serif; color: #1d1f20; }
.apply-switch .track { position: relative; flex-shrink: 0; width: 52px; height: 30px; border-radius: 999px; background: #c4c8cd; transition: background 0.2s; }
.apply-switch .track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}
.apply-switch input:checked + .track { background: #E60023; }
.apply-switch input:checked + .track::after { transform: translateX(22px); }
.apply-light .apply-cosigner-box { padding: 20px 18px; border: 1px solid #e3e4e6; border-radius: 10px; background: #fafafb; }
.apply-cosigner-box .apply-hint { margin: 10px 0 0; }
#cosigner-section { display: flex; flex-direction: column; gap: 44px; padding: 24px 18px; border-left: 3px solid #E60023; border-radius: 0 10px 10px 0; background: #fcfcfd; }
@media (min-width: 768px) { #cosigner-section { padding: 32px 28px; } }

/* ---- signatures ---- */
.apply-consent { padding: 14px 16px; border-radius: 8px; background: #f5f6f7; font-size: 13.5px; line-height: 1.6; color: #45494d; }
.apply-light .apply-sig { margin-top: 26px; }
.apply-sig .apply-grid { margin-bottom: 14px; }
.apply-sig-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.apply-clear {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 4px;
  font: 700 12px/1 'Inter', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5f6368;
}
.apply-clear:hover { color: #c4001d; background: #fff3f5; }
.apply-light .signature-pad {
  display: block;
  width: 100%;
  height: 170px;
  border: 1.5px dashed #b4b8bd;
  border-radius: 8px;
  /* a light "sign here" line near the bottom */
  background: #fff linear-gradient(#d5d8dc, #d5d8dc) no-repeat 24px calc(100% - 38px) / calc(100% - 48px) 1px;
  cursor: crosshair;
  touch-action: none;
}
.apply-light .signature-pad.invalid { border: 1.5px solid #d93025; background-color: #fff8f7; }
/* ---- checkboxes (additional options) ---- */
.apply-checks { display: flex; flex-direction: column; gap: 12px; }
.apply-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 15px; line-height: 1.45; color: #2a2d30; }
.apply-check input {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid #b4b8bd;
  border-radius: 5px;
  color: #E60023;
  cursor: pointer;
}
.apply-check input:focus-visible { outline: 2px solid #E60023; outline-offset: 2px; }
.apply-error { margin-top: 12px; font-size: 14px; font-weight: 600; color: #b3261e; }

/* ---- footer row + messages ---- */
.apply-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid #e3e4e6; }
.apply-back { min-height: 44px; display: inline-flex; align-items: center; font: 700 12px/1 'Inter', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: #5f6368; }
.apply-back:hover { color: #c4001d; }
.apply-submit {
  min-height: 52px;
  padding: 14px 36px;
  border-radius: 6px;
  background: #E60023;
  color: #fff;
  font: italic 800 17px/1 'Inter', sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(230, 0, 35, 0.3);
  transition: background 0.2s, transform 0.15s;
}
.apply-submit:hover { background: #c4001d; }
.apply-submit:active { transform: scale(0.98); }
.apply-submit:disabled { opacity: 0.6; cursor: wait; }
.apply-light .form-status { backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; font-style: normal; }
.apply-light .form-status.success { background: #e9f6ec; border-color: #9fd3ab; color: #1b5e20; }
.apply-light .form-status.success a { color: #1b5e20 !important; }
.apply-light .form-status.error { background: #fdecea; border-color: #f2b8b5; color: #b3261e; }
