/* =====================================================================
   pages-extra.css: forms, review cards, rating badges and the photo
   gallery grid. Linked only from the pages that use them (request-estimate,
   contact, employment-application, testimonials-new, project-gallery,
   roofing-company, roofing-jobs). Uses the :root tokens from site.css only;
   no new colors or fonts.
   ===================================================================== */

/* ---------- Form layout: form card beside a short aside ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.form-aside > * + * { margin-top: 16px; }
.form-aside p { color: var(--muted); }
.form-aside h3 { color: var(--aubergine); }

.form-card { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--gold-mid); border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); box-shadow: 0 14px 30px rgba(36, 10, 66, 0.08); scroll-margin-top: 110px; }
.form-card > h2 { margin-bottom: 8px; }
.form-card .form-intro { color: var(--muted); margin-bottom: 24px; }
.form-req { font-size: 0.95rem; color: var(--muted); margin-bottom: 18px; }
.form-req b, .field .req { color: var(--tan); font-weight: 700; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label, .field legend, .consent legend { font-weight: 700; font-size: 1rem; color: var(--aubergine); }
.field .hint { font-size: 0.9rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; font-size: 1.0625rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid rgba(55, 20, 97, 0.28); border-radius: 6px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.45; }
.field input[type="file"] { padding: 10px; min-height: 0; background: var(--white); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--violet); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--jay); outline-offset: 1px; border-color: var(--violet); background: var(--white); }
.field input:user-invalid, .field textarea:user-invalid, .field select:user-invalid { border-color: #A3292B; }
fieldset.field { border: 0; margin: 0; padding: 0; }

.consent { border: 0; margin: 6px 0 0; padding: 16px 18px; background: var(--paper); border-radius: 6px; }
.consent p { font-size: 0.95rem; color: var(--muted); margin: 6px 0 12px; }
.check { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--ink); cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--violet); flex: none; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 26px; }
.form-actions button.btn { cursor: pointer; font: inherit; font-weight: 700; font-size: 1.0625rem; min-height: 56px; padding-inline: 34px; }
.form-status { margin-top: 20px; padding: 16px 18px; border-left: 4px solid var(--gold-mid); background: var(--paper); border-radius: 4px; font-weight: 700; color: var(--aubergine); }
.form-status[hidden] { display: none; }
.form-status a { white-space: nowrap; }

/* Contact details card list */
.shop-list { display: grid; gap: 18px; }
.shop { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.shop h3 { color: var(--aubergine); }
.shop address { font-style: normal; margin-top: 8px; color: var(--muted); }
.shop .num { font-weight: 700; color: var(--aubergine); text-decoration: underline; text-decoration-color: var(--gold-mid); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.shop p { margin-top: 6px; color: var(--muted); }

/* ---------- Rating badges (Google, Angi) ---------- */
.ratings { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.rating-badge { display: flex; align-items: center; gap: 14px; padding: 14px 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.rating-badge b { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; line-height: 1; color: var(--aubergine); }
.rating-badge span { display: flex; flex-direction: column; font-size: 0.95rem; color: var(--muted); }
.rating-badge .stars { flex-direction: row; color: var(--gold-mid); margin-bottom: 2px; }
a.rating-badge:hover { border-color: var(--gold-mid); }
.on-dark .rating-badge { background: rgba(255, 255, 255, 0.08); border-color: var(--line-dark); color: var(--white); }
.on-dark .rating-badge b { color: var(--white); }
.on-dark .rating-badge span { color: var(--mist); }
.on-dark .rating-badge .stars { color: var(--gold); }

/* ---------- Review cards ---------- */
.review-grid { columns: 3 300px; column-gap: 22px; }
.review-card { break-inside: avoid; margin: 0 0 22px; padding: 26px 26px 24px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--gold-mid); border-radius: var(--radius); }
.review-card blockquote { margin: 0; color: var(--ink); line-height: 1.55; }
.review-card blockquote p + p { margin-top: 10px; }
.review-card figcaption { margin-top: 16px; font-weight: 700; color: var(--tan); }
.review-card .stars { color: var(--gold-mid); margin-bottom: 12px; }
.tone-white .review-card { background: var(--paper); }

/* ---------- Photo gallery grid ---------- */
.photo-grid { columns: 3 280px; column-gap: 18px; }
.photo-grid figure { break-inside: avoid; margin: 0 0 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.photo-grid img { width: 100%; height: auto; }
.photo-grid figcaption { padding: 12px 16px 14px; font-size: 0.95rem; color: var(--muted); }

/* ---------- Phones and tablets ---------- */
@media (max-width: 900px) {
  .form-layout { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .form-actions button.btn { width: 100%; }
  .review-card { padding: 22px 20px 20px; }
}
