/* Gear quote form. Mobile first: base rules target phones, min-width queries add room. */

[hidden] { display: none !important; }

.page-head { background: var(--steel) url(../img/hero.jpg) center 55% / cover; position: relative; color: #fff; }
.page-head::before { content: ""; position: absolute; inset: 0; background: rgba(12,14,16,.84); }
.page-head .wrap { position: relative; padding-top: 32px; padding-bottom: 32px; }
.page-head h1 { font-size: 2.4rem; }
.page-head p { color: #c9ced3; margin-top: 8px; font-size: 1rem; }
@media (min-width: 720px) {
  .page-head .wrap { padding-top: 56px; padding-bottom: 56px; }
  .page-head h1 { font-size: 3.8rem; }
  .page-head p { font-size: 1.15rem; max-width: 620px; }
}

.qf-layout { padding-top: 20px; padding-bottom: 120px; }
@media (min-width: 1000px) {
  .qf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; padding-top: 40px; padding-bottom: 100px; }
}

/* Progress */
.qf-progress { position: sticky; top: 74px; z-index: 30; background: #fff; padding: 12px 0 10px; }
.qf-progress .meta { display: flex; justify-content: space-between; align-items: baseline; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.qf-progress .meta b { font-family: var(--head); font-size: 1.2rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.qf-progress .track { height: 6px; background: var(--line); }
.qf-progress .track i { display: block; height: 100%; background: var(--red); transition: width .25s; }

.qf-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0 6px; font-size: .9rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--red); }

.notice { background: var(--paper); border-left: 4px solid var(--ink); padding: 12px 14px; margin: 12px 0; font-size: .95rem; }
.notice.warn { border-color: var(--red); background: #fff4f5; }

/* Steps */
.qf-step { padding-top: 18px; }
.qf-step h2 { font-size: 2rem; }
.qf-step .sub { color: var(--ink-2); margin: 6px 0 22px; }
.req { color: var(--red); }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; }

.fields { display: grid; gap: 16px; }
@media (min-width: 640px) { .fields.two { grid-template-columns: 1fr 1fr; } .fields .full { grid-column: 1 / -1; } }

.field label, .field .label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field input[type=text], .field input[type=tel], .field input[type=email], .field input[type=number], .field input[type=date], .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; font-size: 16px; /* 16px stops iOS zooming in */
  border: 1px solid #bfbab1; background: #fff; border-radius: 0; color: var(--ink); -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.field input:disabled { background: var(--paper); color: var(--muted); }
.field.invalid input, .field.invalid .choices { outline: 2px solid var(--red); outline-offset: 2px; }
.field .err { display: none; color: var(--red); font-size: .88rem; margin-top: 6px; }
.field.invalid .err { display: block; }
.hint { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Choice chips (radio and checkbox) */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; margin: 0 !important; font-weight: 500 !important; cursor: pointer; }
.choice input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
.choice span { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 16px; border: 1px solid #bfbab1; background: #fff; font-size: 1rem; }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

/* Urgency cards */
.urgency { display: grid; gap: 10px; }
.urgency .choice span { display: block; width: 100%; padding: 14px 16px; }
.urgency .choice strong { display: block; font-family: var(--head); font-size: 1.35rem; text-transform: uppercase; letter-spacing: .02em; }
.urgency .choice small { color: var(--muted); font-size: .92rem; }
.urgency .choice input:checked + span small { color: #d9dde1; }
.urgency .choice.emerg input:checked + span { background: var(--red); border-color: var(--red); }
.urgency .choice.emerg input:checked + span small { color: #fde4e8; }
@media (min-width: 640px) { .urgency { grid-template-columns: repeat(3, 1fr); } }

.emergency-box { background: var(--red); color: #fff; padding: 18px; margin-top: 14px; }
.emergency-box p { color: #fde4e8; margin-top: 4px; }
.emergency-box strong { font-family: var(--head); font-size: 1.4rem; text-transform: uppercase; }
.call-btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; min-height: 58px; background: #fff; color: var(--red); font-family: var(--head); font-weight: 700; font-size: 1.6rem; letter-spacing: .03em; text-decoration: none; }

/* Units toggle */
.units { display: inline-flex; border: 1px solid var(--ink); margin-bottom: 20px; }
.units .choice span { border: 0; min-height: 42px; padding: 8px 18px; }

/* Measurement with "I don't know" */
.measure { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.measure label:first-child { grid-column: 1 / -1; margin-bottom: 0; }
.measure .with-unit { position: relative; }
.measure .with-unit input { padding-right: 48px; }
.measure .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.idk { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; font-size: .92rem !important; color: var(--ink-2); white-space: nowrap; margin: 0 !important; cursor: pointer; min-height: 44px; }
.idk input { width: 20px; height: 20px; accent-color: var(--ink); }
.measure .err { grid-column: 1 / -1; }

/* Quantity stepper */
.stepper { display: inline-flex; border: 1px solid #bfbab1; }
.stepper button { width: 52px; min-height: 50px; border: 0; background: var(--paper); font-size: 1.5rem; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--line); }
.stepper input { width: 90px !important; text-align: center; border: 0 !important; border-left: 1px solid #bfbab1 !important; border-right: 1px solid #bfbab1 !important; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Photos */
.photo-tips { display: grid; gap: 10px; margin-bottom: 20px; }
.photo-tips li { list-style: none; display: flex; gap: 12px; align-items: flex-start; background: var(--paper); padding: 12px 14px; font-size: .95rem; }
.photo-tips svg { flex: none; width: 26px; height: 26px; color: var(--red); margin-top: 1px; }
@media (min-width: 720px) { .photo-tips { grid-template-columns: repeat(3, 1fr); } .photo-tips li { flex-direction: column; } }

.photo-actions { display: grid; gap: 10px; }
.photo-actions .btn { justify-content: center; min-height: 56px; }
.photo-actions input { display: none; }
.camera-only { display: none !important; }
@media (pointer: coarse) { .camera-only { display: inline-flex !important; } .desktop-only { display: none !important; } }
@media (min-width: 640px) { .photo-actions { grid-template-columns: 1fr 1fr; } }

.drop { border: 2px dashed #bfbab1; background: var(--paper); padding: 30px 20px; text-align: center; margin-top: 10px; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--ink); background: #ebe8e1; }
.drop p { color: var(--muted); font-size: .92rem; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 16px; }
.thumb { position: relative; background: var(--paper); border: 1px solid var(--line); aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ext { font-family: var(--head); font-weight: 700; font-size: 1.4rem; color: var(--ink-2); text-transform: uppercase; }
.thumb .nm { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(22,24,26,.78); color: #fff; font-size: .72rem; padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(22,24,26,.8); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.thumb button:hover { background: var(--red); }
.file-count { font-size: .9rem; color: var(--muted); margin-top: 10px; }

/* Review */
.review h3 { font-size: 1.25rem; margin: 24px 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.review dl { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.review dt { color: var(--muted); font-size: .88rem; padding-top: 8px; }
.review dd { padding: 2px 0 8px; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .review dl { grid-template-columns: 180px 1fr; } .review dt, .review dd { padding: 9px 0; border-bottom: 1px solid var(--line); } }
.review .none { color: var(--muted); }

.upload-progress { margin-top: 22px; }
.upload-progress .track { height: 10px; background: var(--line); }
.upload-progress .track i { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s; }
.upload-progress p { font-size: .92rem; color: var(--ink-2); margin-top: 8px; }
.form-error { background: #fff0f2; border-left: 4px solid var(--red); padding: 14px 16px; margin-top: 20px; color: var(--red-dark); }

/* Nav: pinned to the bottom of the screen on phones, inline on larger screens */
.qf-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,.06); }
.qf-nav .btn { flex: 1; justify-content: center; min-height: 52px; }
.qf-nav .back { flex: 0 0 auto; background: none; border: 1px solid #bfbab1; color: var(--ink-2); }
.qf-nav .back:hover { border-color: var(--ink); color: var(--ink); }
@media (min-width: 720px) {
  .qf-nav { position: static; box-shadow: none; padding: 24px 0 0; margin-top: 32px; justify-content: space-between; }
  .qf-nav .btn { flex: 0 0 auto; }
}

/* Success */
.success { text-align: center; padding: 30px 0 10px; }
.success .tick { width: 72px; height: 72px; border-radius: 50%; background: #2e7d32; color: #fff; display: grid; place-items: center; margin: 0 auto 20px; font-size: 2.2rem; }
.success h2 { font-size: 2.4rem; }
.success .ref { display: inline-block; font-family: var(--head); font-size: 1.7rem; letter-spacing: .05em; border: 2px solid var(--ink); padding: 8px 18px; margin: 16px 0; }
.success p { color: var(--ink-2); max-width: 460px; margin: 0 auto 10px; }

/* Aside (desktop only) */
.qf-aside { display: none; }
@media (min-width: 1000px) { .qf-aside { display: block; position: sticky; top: 100px; } }
.qf-aside .box { background: var(--paper); padding: 22px; margin-bottom: 16px; }
.qf-aside h3 { font-size: 1.3rem; margin-bottom: 10px; }
.qf-aside li { list-style: none; padding: 9px 0; border-top: 1px solid var(--line); font-size: .94rem; color: var(--ink-2); }
.qf-aside .dark { background: var(--steel); color: #fff; }
.qf-aside .dark p { color: #c3c8cd; font-size: .94rem; }
.qf-aside .dark a { color: #fff; }

/* The printable form is only for paper */
.print-form { display: none; }

/* Start: choose a path */
.paths { display: grid; gap: 14px; }
@media (min-width: 720px) { .paths { grid-template-columns: 1fr 1fr; } }
.path { text-align: left; background: #fff; border: 2px solid var(--line); padding: 24px 22px; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, box-shadow .15s; }
.path:hover, .path:focus-visible { border-color: var(--ink); box-shadow: 0 8px 22px rgba(0,0,0,.06); outline: none; }
.path strong { font-family: var(--head); font-size: 1.6rem; text-transform: uppercase; letter-spacing: .02em; }
.path span { color: var(--ink-2); font-size: .98rem; }
.path em { font-style: normal; font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--red); margin-top: auto; padding-top: 6px; }

/* Send now: secondary action next to Next */
.btn-line-dark { background: #fff; border: 2px solid var(--ink); color: var(--ink); }
.btn-line-dark:hover { background: var(--ink); color: #fff; }
@media (max-width: 719px) { .qf-nav .btn-line-dark { flex: 0 0 auto; padding-left: 14px; padding-right: 14px; } }

/* Sending */
.sending { text-align: center; padding: 40px 0; }
.sending h2 { margin-bottom: 18px; }
.sending .upload-progress { max-width: 420px; margin: 0 auto; }
.spinner { width: 46px; height: 46px; margin: 0 auto 18px; border: 4px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
