/* Project Quick Entry matches the Potential and Comparison form layout. */
body{padding-top:4px}.portal-container{padding-top:12px}
header{text-align:center;margin-top:0;margin-bottom:12px}header h1{margin-top:0;color:#002060}header .tagline{font-size:1.75rem;line-height:1.05;margin:2px 0 4px;font-weight:700;color:#5cb8ff;text-shadow:-1px -1px #002060,1px -1px #002060,-1px 1px #002060,1px 1px #002060}header .section-title{color:#0070c0}.section-divider{width:75%;height:4px;background:#5CB8FF;border:0;margin:16px auto 12px}
.address-row{grid-template-columns:max-content max-content max-content max-content;gap:14px}
.state-code-field select{width:10ch;min-width:10ch;max-width:10ch}.state-field input{width:8ch;min-width:8ch;max-width:8ch;text-transform:uppercase}.suburb-field .input-container{width:30ch;min-width:30ch;max-width:30ch}.suburb-field input{width:100%;min-width:0;box-sizing:border-box}.postcode-field input{width:10ch;min-width:10ch;max-width:10ch}
.project-name-row{grid-template-columns:minmax(0,3fr) minmax(100px,1fr)}.project-relation-row{grid-template-columns:repeat(2,minmax(0,1fr))}.add-pack-row[hidden]{display:none}.add-pack-row{grid-template-columns:minmax(200px,1fr)}
.notes-row{grid-template-columns:minmax(0,1fr) auto auto auto;align-items:end}.notes-row .field textarea{height:42px;min-height:42px;max-height:110px}.notes-row>button{white-space:nowrap}
.photo-preview{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0}.photo-preview:empty{display:none}.photo-preview figure{width:110px;margin:0}.photo-preview img{display:block;width:110px;height:90px;object-fit:cover;border:1px solid #cbd5e0;border-radius:6px}.photo-preview figcaption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#002060;font-size:.75rem;margin-top:3px}
@media(max-width:900px){.address-row{grid-template-columns:max-content max-content minmax(220px,1fr) max-content;gap:10px}}
@media(max-width:700px){.address-row,.project-relation-row{grid-template-columns:1fr 1fr}.suburb-field,.postcode-field{grid-column:1/-1}.suburb-field .input-container,.postcode-field input{width:100%;min-width:0;max-width:none}.notes-row{grid-template-columns:repeat(3,1fr)}.notes-row .field{grid-column:1/-1}.notes-row>button{width:100%}}
@media(max-width:460px){.address-row,.project-name-row,.project-relation-row{grid-template-columns:1fr}.state-code-field,.state-field,.suburb-field,.postcode-field{grid-column:1}.notes-row{grid-template-columns:1fr 1fr}.notes-row .field{grid-column:1/-1}}
/* Compact Project ID box. */
.identity-row .identity-field{width:33.333%;min-width:0}
.identity-row .identity-field input{width:100%;box-sizing:border-box}
@media(max-width:460px){.identity-row .identity-field{width:50%}}
/* Match the common heading, regardless of earlier template rules. */
.portal-container>header h1{color:#0070c0;font-size:3.5rem}
.portal-container>header .tagline{color:#002060;text-shadow:none}
@media(max-width:900px){.portal-container>header h1{font-size:2.6rem}}
@media(max-width:620px){.portal-container>header h1{font-size:2.15rem}}
.address-row,.street-row{border-bottom:0}
.identity-row{grid-template-columns:max-content;justify-content:start}
.identity-row .identity-field{width:auto;min-width:0}
.identity-row .identity-field input.record-identity{flex:0 0 120px;width:120px;min-width:120px;max-width:120px}
/* Project name is built from SUBurb + STReet + Ville, with optional --Alpha. */
.project-name-row{grid-template-columns:minmax(145px,1fr) minmax(145px,1fr) max-content minmax(245px,1.5fr);gap:10px}
.project-name-row .field{min-width:0}
.project-alpha-field select{flex:0 0 64px;width:64px;min-width:64px;max-width:64px}
.project-name-result input[readonly]{background:#f4f7fb;color:#002060}
@media(max-width:900px){.project-name-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.project-name-row{grid-template-columns:1fr 1fr}.project-name-result{grid-column:1/-1}}
@media(max-width:460px){.project-name-row{grid-template-columns:1fr}.project-name-result{grid-column:1}}
/* Project Type is compact; parent lookup appears only for Add Pack. */
.project-type-row{grid-template-columns:minmax(0,1fr)}
.project-type-field{justify-content:flex-start}
.project-type-field select{flex:0 0 40%;width:40%;min-width:150px;max-width:240px}
.project-parent-block[hidden]{display:none}
.project-search-row{grid-template-columns:minmax(0,1fr)}
.project-search-row .field{max-width:600px}
.project-search-wrap{position:relative;display:flex;flex:1;min-width:0}
.project-search-wrap input{width:100%}
.project-search-results{position:absolute;top:100%;left:0;right:0;z-index:20;background:white;border:1px solid #cbd5e0;border-radius:6px;max-height:230px;overflow:auto;box-shadow:0 5px 12px #0002}
.project-search-results:empty{display:none}
.project-search-results button{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #edf2f7;border-radius:0;background:white;padding:9px;color:#002060}
.project-search-results button:hover,.project-search-results button:focus{background:#eef7ff}
.project-selected-row{grid-template-columns:minmax(130px,1fr) minmax(0,3fr)}
@media(max-width:620px){.project-type-field select{min-width:150px}.project-selected-row{grid-template-columns:1fr}}


/* Site layout — base intentionally matches Project Quick Entry */
.condition-row{
  grid-template-columns:minmax(150px,240px);
}
.condition-field select{
  width:100%;
}
.site-notes-row{
  grid-template-columns:minmax(0,1fr) max-content max-content;
}

.identity-divider{
  width:100%;
  height:2px;
  background:#5CB8FF;
  border:0;
  margin:10px 0 14px;
}


/* Site address adjustment: only street widths + location button position */
.street-row{
  display:grid !important;
  grid-template-columns:calc((100% - 24px) * .34) calc((100% - 24px) * .16) 1fr 120px !important;
  gap:12px !important;
  align-items:end !important;
}
.street-row .street-name-compact{
  grid-column:1 !important;
  width:100% !important;
}
.street-row .street-number-compact{
  grid-column:2 !important;
  width:100% !important;
}
.street-row #find_location_btn{
  grid-column:4 !important;
  align-self:end !important;
  height:38px !important;
  min-height:38px !important;
  max-height:38px !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  line-height:38px !important;
  white-space:nowrap !important;
}

/* Site detail rows copied from the supplied form. */
.detail-row{grid-template-columns:repeat(4,minmax(0,1fr))}
.detail-row .field{min-width:0}
.detail-row .field label{white-space:normal}
.unit-wrap{position:relative;display:flex;flex:1;min-width:0}
.unit-wrap input{padding-right:38px}
.unit{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:#002060;font-weight:700;pointer-events:none}
@media(max-width:700px){.detail-row{grid-template-columns:1fr 1fr}}

/* Widen only Is Auction; leave the other controls unchanged. */
#is_auction{width:100%!important;min-width:0!important;max-width:none!important;flex:1!important}
.agency-row{grid-template-columns:repeat(2,minmax(0,1fr))}
.agent-row{grid-template-columns:repeat(2,minmax(0,1fr))}

.street-row .fml-spacer{grid-column:4;display:block;height:38px;min-height:38px;width:100%;visibility:hidden}

.site-actions-row{grid-template-columns:minmax(0,1fr) auto auto;align-items:end}
.site-actions-row .notes-field{min-width:0}
@media(max-width:900px){.site-actions-row{grid-template-columns:minmax(0,1fr) auto auto}.site-actions-row>button{grid-column:auto}}

/* Four equal agency fields on the agency row. */
.agency-contact-row{grid-template-columns:repeat(4,minmax(0,1fr))}
.agency-contact-row .field{min-width:0;flex-direction:column;align-items:stretch;gap:3px}
.agency-contact-row .field label{white-space:normal}
@media(max-width:900px){.agency-contact-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.agency-contact-row{grid-template-columns:1fr}}

/* PO Box applies only to the adjacent contact address. */
.po-box-row{grid-template-columns:1fr;padding:6px 0}
.po-box-field{display:inline-flex;align-items:center;gap:8px;width:max-content;color:#002060;font-weight:600;cursor:pointer}
.po-box-field input{width:18px;height:18px;margin:0;accent-color:#0070c0}

/* Agent first name, last name, phone and email use equal columns. */
.agent-contact-row{grid-template-columns:repeat(4,minmax(0,1fr))}
.agent-contact-row .field{min-width:0;flex-direction:column;align-items:stretch;gap:3px}
.agent-contact-row .field label{white-space:normal}
@media(max-width:900px){.agent-contact-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.agent-contact-row{grid-template-columns:1fr}}


/* HVP 2026-09-29 responsive rebuild */
html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}body{margin:0;min-width:0;overflow-x:hidden}main,.page,.form-shell,.container{max-width:1440px;margin-inline:auto;width:100%}input,select,textarea,button{max-width:100%;min-width:0}.form-row{min-width:0}.field{min-width:0}.address-row,.form-row{gap:clamp(8px,1.2vw,18px)}
@media(max-width:900px){.cols-5,.cols-4,.cols-3,.cols-2,.address-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}.identity-row{grid-template-columns:1fr 1fr!important}header{padding-inline:16px}.form-shell,.page,main,.container{padding-inline:12px}}
@media(max-width:600px){body{font-size:16px}.cols-5,.cols-4,.cols-3,.cols-2,.address-row,.identity-row{grid-template-columns:1fr!important}.field,button,input,select,textarea{width:100%}input,select,button{min-height:44px}textarea{min-height:96px}.notes-row{display:grid!important;grid-template-columns:1fr!important}.fml-pin{margin-right:6px}.record-identity{width:100%}.postal-address-panel{padding:12px}.hvp-pin-card{width:min(92vw,420px)}}
.postal-address-panel{border:2px solid #0070C0;border-radius:12px;padding:14px;margin:10px 0 18px;background:#eef8ff}.postal-address-panel h3{margin:0 0 10px;color:#002060}.hvp-pin-gate{position:fixed;inset:0;z-index:99999;background:#5CB8FF;display:grid;place-items:center;padding:18px}.hvp-pin-card{background:white;border:3px solid #002060;border-radius:16px;padding:24px;box-shadow:0 18px 50px rgba(0,32,96,.25);font-family:Fredoka,sans-serif}.hvp-pin-card h2{margin:0 0 8px;color:#002060}.hvp-pin-card input{width:100%;font-size:22px;text-align:center;letter-spacing:.18em;margin:12px 0}.hvp-pin-card button{width:100%;background:#002060;color:#fff;border:0;border-radius:10px;padding:12px;font-weight:700}.hvp-pin-error{min-height:1.3em;color:#a40000;margin-top:8px}.hvp-locked{visibility:hidden}

/* HVP PAGE RESPONSIVE FINAL */
@media (max-width:900px){
  .address-row,.street-row,.notes-row,.identity-row{min-width:0!important}
  .state-code-field select,.state-field input,.postcode-field input,.suburb-field .input-container{width:100%!important;min-width:0!important;max-width:none!important}
}
@media (max-width:620px){
  .form-row>*{min-width:0!important;max-width:100%!important}
  .project-search-row .field,.project-type-field select{max-width:none!important;width:100%!important}
  .project-alpha-field select{width:100%!important;min-width:0!important;max-width:none!important;flex:1 1 auto!important}
  .unit-input input{width:100%!important}
}

/* HVP FINAL RESPONSIVE REFLOW OVERRIDE — layout only */
html,body{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important}
body{padding:clamp(4px,1.5vw,12px)!important}
.portal-container,main,.page,.form-shell,.container{width:min(100%,1180px)!important;max-width:100%!important;min-width:0!important;margin-inline:auto!important}
form,.form-row,.field,.input-container,.unit-input{min-width:0!important;max-width:100%!important}
.field input,.field select,.field textarea,.input-container,.unit-input{max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
img,svg,canvas,iframe{max-width:100%!important}

@media (max-width:900px){
  .portal-container{padding:20px 18px 28px!important}
  .form-row,.cols-5,.cols-4,.cols-3,.cols-2,.address-row,.street-row,.project-name-row,.project-relation-row,.project-selected-row,.detail-row,.agency-contact-row,.agent-contact-row,.site-actions-row,.listing-row,.owner-row,.tenant-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .field{min-width:0!important;max-width:100%!important}
  .suburb-field .input-container,.postcode-field input,.state-code-field select,.state-field input,.project-type-field select,.identity-field input,.record-identity{width:100%!important;min-width:0!important;max-width:100%!important;flex:1 1 auto!important}
  .identity-row,.identity-three-id-row,.identity-right-group{grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;max-width:100%!important;display:grid!important}
  .notes-row{grid-template-columns:minmax(0,1fr) repeat(2,minmax(120px,auto))!important}
  [id$="_map"]{position:static!important;inset:auto!important;float:none!important;transform:none!important;width:min(100%,420px)!important;max-width:100%!important;height:auto!important;aspect-ratio:1/1!important;margin:12px auto!important}
  [id$="_map"] iframe{width:100%!important;height:100%!important}
}

@media (max-width:620px){
  body{padding:0!important}
  .portal-container{width:100%!important;max-width:100%!important;padding:16px 12px 24px!important;border-radius:0!important;box-shadow:none!important}
  h1{font-size:clamp(1.8rem,10vw,2.35rem)!important;overflow-wrap:anywhere}
  .section-title{font-size:clamp(1.35rem,7vw,1.8rem)!important}
  .form-row,.cols-5,.cols-4,.cols-3,.cols-2,.address-row,.street-row,.project-name-row,.project-relation-row,.project-selected-row,.detail-row,.agency-contact-row,.agent-contact-row,.site-actions-row,.listing-row,.owner-row,.tenant-row,.identity-row,.identity-three-id-row,.identity-right-group,.notes-row{grid-template-columns:1fr!important;width:100%!important;max-width:100%!important}
  .field{width:100%!important;max-width:100%!important;min-width:0!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important}
  .field label{white-space:normal!important;width:100%!important;line-height:1.2!important}
  .field input,.field select,.field textarea,.input-container,.unit-input,.suburb-field .input-container,.postcode-field input,.state-code-field select,.state-field input,.project-type-field select,.identity-field input,.record-identity{width:100%!important;min-width:0!important;max-width:100%!important;flex:1 1 auto!important}
  .form-row>button,.notes-row>button,.street-row>button,#find_location_btn{width:100%!important;max-width:100%!important;grid-column:1!important;justify-self:stretch!important}
  .suburb-field,.postcode-field,.state-code-field,.state-field,.project-name-result,.notes-row .field{grid-column:1!important}
  .boolean-field,.boolean-field select{width:100%!important;min-width:0!important;max-width:100%!important;flex:1 1 auto!important}
  [style*="width:"],[style*="min-width:"],[style*="max-width:"]{max-width:100%!important}
}

@media (max-width:380px){
  .portal-container{padding-inline:9px!important}
  button{padding-left:12px!important;padding-right:12px!important}
}
