:root{
  --bg:#f4f6f8;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#5d5f65;
  --line:#e5e7eb;

  /* LastMile palette */
  --navy:#203868;
  --teal:#007888;
  --teal2:#50A888;
  --green:#A0C888;
  --orange:#F0A000;

  --danger:#dc3535;

  --dot:#d1d5db;
  --dotActive: var(--green);

  --primary: var(--teal);
  --primaryDark: #006877; /* slightly darker teal */
}

*{box-sizing:border-box;}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.brandLogo{
  max-width: 70vw;
  width: 220px;
  height: auto;
  display:block;
}

.wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.card{
  width:min(980px, 95vw);
  background:var(--card);
  border-radius:12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  padding:28px 34px 18px;
}

.title{
  text-align:center;
  font-size:44px;
  font-weight:600;
  margin:10px 0 20px;
}

.logoWrap{display:flex; justify-content:center; margin:10px 0 24px;}
.logoPlaceholder{
  width:210px; height:210px;
  background:#2f4f7f;
  color:white;
  display:flex; align-items:center; justify-content:center;
  font-size:56px; font-weight:800;
  line-height:0.95;
  border-radius:2px;
}
h1{font-size:30px; margin:10px 0 18px;}
h2{font-size:28px; margin:6px 0 10px;}
hr{border:none; border-top:1px solid var(--line); margin:10px 0 18px;}


p{font-size:18px; line-height:1.55; margin:12px 0; color:#111827;}
.emph{font-style:italic; font-weight:600;}

/* Checkboxes */
.check{
  display:flex;
  gap:12px;
  align-items:flex-start;
  margin:18px 0;
  font-size:18px;
}

.check.center{
  display:flex;
  gap:12px;
  align-items:center;
  margin:18px 0;
  font-size:18px;
}

.check.required span::after{
  content: " *";
  color: var(--danger);
  font-weight: 700;
}

.check input[type="checkbox"]{
  width:20px;
  height:20px;
  /* margin-top:4px; */
  flex: 0 0 20px;
  accent-color: var(--teal);
}

input[type="radio"]{
  accent-color: var(--teal);
}

input[type="date"]{
  font-size:16px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  outline:none;
  color:var(--muted);
  /* width: 50%; */
}


/* Required star in hint */
.reqStar{
  color: var(--danger);
  font-weight: 700;
}

/* Field labels (Contact page) */
.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:16px;
  color:var(--muted);
}

.fieldLabel{
  display:inline;
  font-size:18px;
}

.field.required .fieldLabel::after{
  content:" *";
  color: var(--danger);
  font-weight:700;
}

/* Grid for Contact fields */
.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px 18px;
  margin-top:10px;
}

/* Do NOT override .field sizing inside grid */
.grid input, .grid textarea{
  font-size:16px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  outline:none;
}

.grid input:focus, .grid textarea:focus{border-color:#94a3b8;}
.span2{grid-column:1 / -1;}

.hint{color:var(--muted); font-size:14px;}

/* Errors: works with JS setError(display none/block) */
.error{
  display: none;
  margin-top: 6px;
  font-size: 14px;
  color: var(--danger);
}

/* Checkbox errors */
.error.inlineErr{
  display: none;
  margin-top: 8px;
}

.nav{
  display:flex;
  justify-content:space-between;
  margin-top:18px;
  padding-top:14px;
  padding-bottom:max(10px, env(safe-area-inset-bottom));
}

.btn{
  border:none;
  border-radius:6px;
  padding:10px 16px;
  font-size:16px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.btn.secondary:disabled{opacity:.5; cursor:not-allowed;}
.btn.primary{background:var(--primary); color:white;}
.btn.primary:hover{background:var(--primaryDark);}
.btn.secondary{background:#9aa0a6; color:white;}

.clearLink{
  border: none;
  background: transparent;
  padding: 0;
  margin-left: 8px;
  color: #111;               /* black */
  text-decoration: underline;
  font-size: 16px;
  cursor: pointer;
}
.clearLink:hover{ opacity: 0.75; }

.dots{
  display:flex;
  justify-content:center;
  gap:28px;
  padding:18px 0 8px;
}

.dot{
  width:16px; height:16px;
  border-radius:999px;
  background:var(--dot);
}

.dot.active{background:var(--dotActive);}

.step{display:none;}
.step.active{display:block;}



.address-autocomplete {
  position: relative;
  width: 100%;
  /* Wrapper is not a flex child of .field, so stretch full width like sibling inputs */
}

.address-autocomplete input {
  width: 100%;
  box-sizing: border-box;
}

.suggestions {
  position: absolute;
  z-index: 1000;
  width: 100%;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.suggestions[hidden] {
  display: none;
}

.suggestions li {
  padding: 10px 12px;
  cursor: pointer;
}

.suggestions li:hover,
.suggestions li.active {
  background: #f3f4f6;
}


.reviewBox{
  border:1px solid var(--line);
  border-radius:10px;
  padding:14px;
  background:#fafafa;
  font-size:16px;
}





.reviewRow{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.reviewRow:last-child{ border-bottom:none; }

.reviewKey{
  color: var(--muted);
  font-weight: 600;
}

.reviewVal{
  color:#111827;
  word-break: break-word;
}
/* Q/A layout rows for Donation Details */
.twoCol{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: start;
  margin: 16px 0;
}

.leftLabel{
  font-size: 18px;
  line-height: 1.2;
  color: var(--muted);
  padding-top: 6px;
}

/* Required asterisk on left labels */
.leftLabel.required .fieldLabel::after{
  content:" *";
  color: var(--danger);
  font-weight:700;
}

.rightField input[type="text"],
.rightField input[type="number"]{
  width: 80%;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.rightField input[type="text"]:focus,
.rightField input[type="number"]:focus{
  border-color:#94a3b8;
}


.rightField select{
  width: 80%;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}


.radioList{
  display: grid;
  gap: 10px;
  font-size: 16px;
}

.radioRow{
  display:flex;
  gap:18px;
  align-items:center;
  flex-wrap:wrap;
  font-size:18px;
}

/* Hide the whole Details row until a reject type is chosen */
.detailsRow{ display: none; }
.detailsRow.active{ display: grid; }  /* .twoCol is grid */

/* Panels: hidden until active */
.rejectPanel{ display: none; }
.rejectPanel.active{ display: block; }


.subPanel{ display:none; margin-top:12px; }
.subPanel.active{ display:block; }


/* Hide the real file input (but keep it accessible) */
.fileInput{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Row: button + filename */
.fileRow{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:12px;
  flex-wrap:nowrap;
  margin-top:10px;
}

/* Upload button: light green + black text, same shape as other buttons */
.btn.uploadBtn{
  background: var(--green);
  color: #111;
}

.btn.uploadBtn:hover{
  filter: brightness(0.95);
}

.fileName{
  color: var(--muted);
  font-size: 14px;
}

.smallBtn{
  padding: 10px 14px;
  font-size: 14px;
}


#photoPreview{
  display:none;
  max-width:260px;
  border-radius:8px;
  margin-top:10px;
}

.filePreview{
  display:none;
  max-width:260px;
  border-radius:8px;
  margin-top:10px;
}

/* Desktop defaults */
.desktopOnly{ display:inline-flex; }
.mobileOnly{ display:none; }
.removeBtn{ display:inline-flex; }


/* Mobile improvements */
@media (max-width: 640px){
  .wrap{
    padding: 12px;
  }


  .card{
    padding: 18px 16px 14px;
  }

  .title{
    font-size: 30px;
    line-height: 1.15;
    margin: 8px 0 12px;
  }

  h2{
    font-size: 24px;
    margin: 6px 0 8px;
  }

  .logoWrap{
    margin: 6px 0 14px;
  }

  /* Make logo readable on mobile */
  .brandLogo{
    width: 180px;
    max-width: 60vw;
    height: auto;
  }

  .grid{
    grid-template-columns: 1fr;
  }

  .twoCol{
    grid-template-columns: 1fr; /* stack label above input */
  }

  .rightField{
    width: 100%; /* full width on mobile */
  }

  .nav{
    gap: 12px;
  }

  /* Make label-as-button behave like a button */
  .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center; /* centers text */
    }
  .reviewRow{
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .desktopOnly{ display:none; }
  .mobileOnly{ display:inline-flex; }

  .fileRow{
    flex-direction: column;  /* stack buttons */
    align-items: stretch;    /* full width */
    gap:10px;
  }

  /* Make Upload + Take + Remove same width on phone */
  .fileRow .btn{
    width: 100%;
    justify-content:center;
  }

  /* Put Remove below: make it full width too */
  .removeBtn{
    order: 3; /* after Upload (1) and Take (2) */
  }
  /* Order: Upload, Take, Remove */
  #photoActionBtn{ order: 1; }
  #takePhotoBtn{ order: 2; }
  #photoRemoveBtn{ order: 3; }

}

/* Distance warning (service area) */
.modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.45);
}

.modalOverlay[hidden] {
  display: none !important;
}

.modalCard {
  max-width: 440px;
  width: 100%;
  background: var(--card);
  border-radius: 12px;
  padding: 22px 24px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modalTitle {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
}

.modalBody {
  margin: 0 0 20px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
}

.modalActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* Embedded mode (admin modal iframe) */
body.is-embedded{
  background:#fff;
}

body.is-embedded .wrap{
  min-height:auto;
  align-items:stretch;
  justify-content:flex-start;
  padding:12px 16px;
}

body.is-embedded .card{
  width:min(980px, 100%);
  margin:0 auto;
  border-radius:10px;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
  padding:16px 20px 12px;
}

body.is-embedded .title{
  margin:0 0 10px;
  font-size:34px;
}

body.is-embedded .logoWrap{
  margin:0 0 12px;
}

body.is-embedded .title,
body.is-embedded .logoWrap{
  display:none;
}

body.is-embedded .brandLogo{
  width:170px;
}

body.is-embedded h2{
  font-size:24px;
}

body.is-embedded p,
body.is-embedded .check,
body.is-embedded .fieldLabel,
body.is-embedded .radioRow{
  font-size:16px;
}

body.is-embedded .leftLabel{
  font-size:16px;
}

body.is-embedded .nav{
  position:sticky;
  bottom:0;
  background:#fff;
  z-index:2;
  border-top:1px solid var(--line);
  margin-top:16px;
  padding-top:10px;
  padding-bottom:max(8px, env(safe-area-inset-bottom));
}

body.is-embedded #wizardForm{
  padding-bottom:8px;
}





