/* ═══════════════════════════════════════════════════════════════════
 * cgp-calculator-residential-survey.css
 *
 * Submission section for the residential calculator's result view.
 * Targets the markup emitted by cgp-calculator-residential-survey.js.
 *
 * v1.1.0 (2026-05-25) — unified with the main calculator:
 *   • Consumes shared --cgp-* tokens from cgp-calculator-residential.css.
 *     The duplicate token block (--ink, --action, --border, …) has been
 *     deleted entirely. Single source of truth in the main file.
 *   • Card radius now matches via --cgp-r-card (18px, was 20px).
 *   • Field radius now matches via --cgp-r-soft (12px, was 10px).
 *   • Submit button now matches via --cgp-r-btn (12px, was a pill).
 *     The button keeps the full --cgp-action treatment when ready and
 *     a white outlined off-state when disabled.
 *   • Survey cards drop to --cgp-elev-1 (flat tier, same as plan/cost
 *     cards). They no longer outshadow the plan card above them.
 *   • Field labels bumped from 13px → 14px to close the gap with the
 *     calculator's 15px step labels (form density preserved).
 *   • "Επόμενα βήματα" eyebrow keeps blue (action/process) by design —
 *     distinct from the result section's green (success) eyebrow.
 *
 * @package charge-guide-platform
 * @version 1.1.2
 * @date    2026-05-25
 * ═══════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
 * Root — surface only
 * All design tokens now live in the main file
 * (.cgp-calculator-residential). Anything below
 * uses --cgp-* directly.
 * ───────────────────────────────────────────── */

.cgp-res-survey {
  margin-top: 44px;
  padding-top: 40px;
  border-top: 1px solid var(--cgp-border-soft);
  font-family: var(--cgp-f-body);
  color: var(--cgp-text);
}

/* Belt-and-braces reset so WP theme rules can't bleed in.
   :where() keeps specificity at (0,1,0). */
.cgp-res-survey,
.cgp-res-survey *,
.cgp-res-survey *::before,
.cgp-res-survey *::after {
  box-sizing: border-box;
}
.cgp-res-survey :where(p) { margin: 0; }
.cgp-res-survey :where(ul) { margin: 0; padding: 0; list-style: none; }
.cgp-res-survey :where(button) {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* ─────────────────────────────────────────────
 * CSS-only bridge strip
 * Rendered via ::before on the survey root —
 * no markup change required. Anchors the survey
 * as the next step after the result card.
 * Blue (action) — semantically distinct from the
 * result section's green (success) eyebrow.
 * ───────────────────────────────────────────── */

.cgp-res-survey::before {
  content: "Επόμενα βήματα · Φωτογραφίες και επικοινωνία";
  display: block;
  font-family: var(--cgp-f-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cgp-action);
  padding: 12px 18px;
  background: var(--cgp-tint-soft);
  border: 1px solid var(--cgp-border-soft);
  border-radius: var(--cgp-r-pill);
  margin-bottom: 22px;
  width: fit-content;
}

/* ─────────────────────────────────────────────
 * Reset link row — quiet, above both cards
 * ───────────────────────────────────────────── */

.cgp-res-survey-reset-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.cgp-res-survey-reset-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cgp-text-2);
  font-family: var(--cgp-f-display);
  font-weight: 500;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--cgp-border-strong);
  padding: 6px 0;
  transition: var(--cgp-t);
}
.cgp-res-survey-reset-link:hover {
  color: var(--cgp-ink);
  text-decoration-color: var(--cgp-text-2);
}

/* Notes toggle */
.cgp-res-survey-notes-wrap {
  margin-top: 14px;
}

.cgp-res-survey-notes-toggle {
  display:         inline-flex;
  align-items:     center;
  gap:             5px;
  font-family:     var(--cgp-f-display);
  font-size:       13px;
  font-weight:     500;
  color:           var(--cgp-text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--cgp-border-strong);
  padding:         4px 0;
  transition:      var(--cgp-t);
  cursor:          pointer;
}

.cgp-res-survey-notes-toggle:hover {
  color:                 var(--cgp-ink);
  text-decoration-color: var(--cgp-text-2);
}

.cgp-res-survey-notes-toggle svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.cgp-res-survey-notes-toggle--open svg {
  transform: rotate(180deg);
}

.cgp-res-survey-notes-area {
  margin-top: 8px;
  display:    block;
  width:      100%;
}

/* ─────────────────────────────────────────────
 * Two-card grid
 * Cards sit at elev-1 — the same flat tier as
 * the plan and cost cards above them.
 * ───────────────────────────────────────────── */

.cgp-res-survey-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.cgp-res-scard {
  background: var(--cgp-white);
  border: 1px solid var(--cgp-border);
  border-radius: var(--cgp-r-card);
  padding: 30px 30px 28px;
  box-shadow: var(--cgp-elev-1);
  display: flex;
  flex-direction: column;
  transition: var(--cgp-t);
}

/* Locked state — softer surface, no shadow */
.cgp-res-scard.cgp-res-scard--locked {
  box-shadow: none;
  background: var(--cgp-tint-soft);
  border-color: var(--cgp-border-soft);
}

/* ─────────────────────────────────────────────
 * Card head — confident anchor
 * Nested 01/02 markers — half the scale of the
 * main calculator's 64px step numbers.
 * ───────────────────────────────────────────── */

.cgp-res-scard-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 18px;
}
.cgp-res-scard-num {
  font-family: var(--cgp-f-display);
  font-weight: 300;
  font-size: 44px;
  line-height: 1;
  color: var(--cgp-action);
  letter-spacing: -0.04em;
  flex-shrink: 0;
  min-width: 52px;
}
.cgp-res-scard-num.cgp-res-scard-num--dim {
  color: var(--cgp-text-3);
}
.cgp-res-scard-head > div:last-child {
  padding-top: 4px;
  flex: 1 1 auto;
  min-width: 0;
}
.cgp-res-scard-eyebrow {
  font-family: var(--cgp-f-display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cgp-blue);
  margin-bottom: 4px;
}
.cgp-res-scard-title {
  font-family: var(--cgp-f-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--cgp-ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.cgp-res-scard-sub {
  font-size: 14px;
  color: var(--cgp-text-2);
  line-height: 1.55;
  margin: 0 0 22px;
}
.cgp-res-scard--locked .cgp-res-scard-eyebrow { color: var(--cgp-text-3); }
.cgp-res-scard--locked .cgp-res-scard-title   { color: var(--cgp-text-2); }

/* ─────────────────────────────────────────────
 * Card A — dropzone (empty state)
 * ───────────────────────────────────────────── */

.cgp-res-survey-dropzone {
  border: 2px dashed var(--cgp-border-strong);
  border-radius: var(--cgp-r-soft);
  padding: 30px 22px;
  text-align: center;
  background: var(--cgp-tint-soft);
  cursor: pointer;
  transition: var(--cgp-t);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cgp-res-survey-dropzone:hover,
.cgp-res-survey-dropzone.cgp-res-survey-dropzone--hover {
  border-color: var(--cgp-action);
  background: var(--cgp-tint);
}
.cgp-res-survey-dz-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cgp-white);
  border: 1px solid var(--cgp-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cgp-action);
}
.cgp-res-survey-dz-main {
  font-family: var(--cgp-f-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--cgp-ink);
}
.cgp-res-survey-dz-main em {
  /* JS uses <em> around "επιλέξτε αρχεία" — render as action link */
  font-style: normal;
  color: var(--cgp-action);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cgp-res-survey-dz-sub {
  font-size: 12.5px;
  color: var(--cgp-text-3);
  font-family: var(--cgp-f-display);
  font-weight: 500;
}

/* ─────────────────────────────────────────────
 * Card A — gallery (after upload)
 * ───────────────────────────────────────────── */

.cgp-res-survey-gallery {
  /* JS toggles display via .style.display so don't force a value here. */
}
.cgp-res-survey-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cgp-res-survey-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--cgp-r-soft);
  overflow: hidden;
  background: var(--cgp-tint-soft);
  border: 1px solid var(--cgp-border-soft);
}
.cgp-res-survey-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cgp-res-survey-thumb-rm {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15,34,55,0.78);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--cgp-t);
}
.cgp-res-survey-thumb-rm:hover {
  background: rgba(15,34,55,0.95);
}

.cgp-res-survey-gallery-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  gap: 12px;
}
.cgp-res-survey-add-more {
  border: 1.5px dashed var(--cgp-border-strong);
  border-radius: var(--cgp-r-pill);
  padding: 8px 16px;
  font-family: var(--cgp-f-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--cgp-text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--cgp-t);
  background: var(--cgp-white);
}
.cgp-res-survey-add-more:hover {
  border-color: var(--cgp-action);
  color: var(--cgp-action);
}
.cgp-res-survey-photo-count {
  font-size: 12.5px;
  color: var(--cgp-text-3);
  font-family: var(--cgp-f-display);
  font-weight: 500;
}
.cgp-res-survey-photo-count strong {
  color: var(--cgp-ink-2);
  font-weight: 700;
}

/* ─────────────────────────────────────────────
 * Card A — locked confirmation block
 * ───────────────────────────────────────────── */

.cgp-res-survey-locked-confirm {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--cgp-ok-soft-bg);
  border: 1px solid var(--cgp-ok-border);
  border-radius: var(--cgp-r-soft);
  padding: 18px 20px;
}
.cgp-res-survey-locked-check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cgp-ok-icon);
  color: white;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cgp-res-survey-locked-h {
  font-family: var(--cgp-f-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--cgp-ok-text);
  line-height: 1.3;
}
.cgp-res-survey-locked-s {
  font-size: 12.5px;
  color: var(--cgp-text-2);
  margin-top: 2px;
}

.cgp-res-survey-locked-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 14px;
}
.cgp-res-survey-thumb.cgp-res-survey-thumb--locked {
  aspect-ratio: 1 / 1;
  filter: saturate(0.78) brightness(0.96);
}

/* ─────────────────────────────────────────────
 * Card A — recommended-photos list
 * ───────────────────────────────────────────── */

.cgp-res-survey-rec {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--cgp-border-soft);
}
.cgp-res-survey-rec-lbl {
  font-family: var(--cgp-f-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--cgp-ink-2);
  margin-bottom: 10px;
}
.cgp-res-survey-rec-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cgp-res-survey-rec-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--cgp-text-2);
  line-height: 1.45;
}
.cgp-res-survey-rec-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cgp-blue);
}

.cgp-res-survey-foot {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--cgp-text-3);
  line-height: 1.5;
}

/* ─────────────────────────────────────────────
 * Card B — contact form
 *
 * Field labels bumped 13 → 14px to close the gap
 * with the main calculator's 15px step labels.
 * Field inputs use --cgp-r-soft (12px) — same
 * radius as the postcode input shell upstairs.
 * ───────────────────────────────────────────── */

.cgp-res-survey-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cgp-res-survey-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cgp-res-survey-field-lbl {
  font-family: var(--cgp-f-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--cgp-ink-2);
  letter-spacing: 0.005em;
}
.cgp-res-survey-field-lbl em {
  /* JS uses <em> for "(προαιρετικά)" — render as quiet meta */
  font-style: normal;
  font-weight: 500;
  font-size: 12px;
  color: var(--cgp-text-3);
  margin-left: 4px;
}
.cgp-res-survey-field-inp {
  height: 46px;
  border: 1.5px solid var(--cgp-border);
  border-radius: var(--cgp-r-soft);
  background: var(--cgp-white);
  padding: 0 14px;
  font-family: var(--cgp-f-display);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--cgp-ink);
  transition: var(--cgp-t);
  outline: 0;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.cgp-res-survey-field-inp::placeholder {
  color: var(--cgp-text-4);
  font-weight: 400;
}
.cgp-res-survey-field-inp:hover {
  border-color: var(--cgp-border-strong);
}
.cgp-res-survey-field-inp:focus {
  border-color: var(--cgp-action);
  box-shadow: 0 0 0 4px rgba(22,101,216,0.10);
}
.cgp-res-survey-field-inp[readonly] {
  background: var(--cgp-tint-soft);
  color: var(--cgp-text-2);
  cursor: default;
  border-color: var(--cgp-border-soft);
}
.cgp-res-survey-field-inp[readonly]:hover {
  border-color: var(--cgp-border-soft);
}
/* Prefilled postcode — subtle hint it was auto-filled */
.cgp-res-survey-field-inp.cgp-res-survey-field-inp--prefilled {
  background: var(--cgp-tint-soft);
}
.cgp-res-survey-field-inp.cgp-res-survey-field-inp--prefilled:focus {
  background: var(--cgp-white);
}

textarea.cgp-res-survey-field-inp {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  min-height: 76px;
  line-height: 1.5;
  font-family: var(--cgp-f-body);
}

.cgp-res-survey-field-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

/* ─────────────────────────────────────────────
 * Submit button
 *
 * Aligned to the calculator's button shape via
 * --cgp-r-btn (12px). Default = solid --cgp-action
 * with the brand --cgp-shadow-cta. Off-state =
 * white surface with grey outline and muted label —
 * clearly *not* the action, never washed-out blue.
 * ───────────────────────────────────────────── */

.cgp-res-survey-submit-wrap {
  margin-top: 24px;
}
.cgp-res-survey-submit-btn {
  width: 100%;
  border-radius: var(--cgp-r-btn);
  padding: 15px 24px;
  font-family: var(--cgp-f-display);
  font-size: 15.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--cgp-t);
  border: 1.5px solid var(--cgp-action);
  background: var(--cgp-action);
  color: var(--cgp-white);
  box-shadow: var(--cgp-shadow-cta);
  line-height: 1;
  letter-spacing: 0.005em;
}
.cgp-res-survey-submit-btn:hover:not([disabled]):not(.cgp-res-survey-submit-btn--off) {
  background: var(--cgp-action-deep);
  border-color: var(--cgp-action-deep);
  transform: translateY(-1px);
}
.cgp-res-survey-submit-btn:hover:not([disabled]):not(.cgp-res-survey-submit-btn--off) svg {
  transform: translateX(2px);
}
.cgp-res-survey-submit-btn svg {
  transition: transform 0.2s ease;
}
.cgp-res-survey-submit-btn[disabled],
.cgp-res-survey-submit-btn.cgp-res-survey-submit-btn--off {
  background: var(--cgp-white);
  border-color: var(--cgp-border-strong);
  color: var(--cgp-text-3);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Submitted confirmation block (replaces the button) */
.cgp-res-survey-submit-confirm {
  width: 100%;
  border-radius: var(--cgp-r-btn);
  padding: 14px 22px;
  background: var(--cgp-ok-soft-bg);
  border: 1.5px solid var(--cgp-ok-border);
  color: var(--cgp-ok-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--cgp-f-display);
  font-weight: 700;
  font-size: 14.5px;
}
.cgp-res-survey-ok-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cgp-ok-icon);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cgp-res-survey-submit-note {
  text-align: center;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--cgp-text-3);
  line-height: 1.55;
}

/* ─────────────────────────────────────────────
 * Responsive
 * ───────────────────────────────────────────── */

@media (max-width: 880px) {
  .cgp-res-survey { margin-top: 32px; padding-top: 32px; }
  .cgp-res-survey::before {
    width: auto;
    text-align: center;
    padding: 10px 14px;
    margin-bottom: 18px;
  }
  .cgp-res-survey-cards { grid-template-columns: 1fr; }
  .cgp-res-scard { padding: 24px 22px; }
  .cgp-res-scard-num { font-size: 36px; min-width: 44px; }
  .cgp-res-scard-title { font-size: 18px; }
  .cgp-res-survey-field-row { grid-template-columns: 1fr 100px; }
  .cgp-res-survey-locked-gallery { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 520px) {
  .cgp-res-survey-thumbs { grid-template-columns: repeat(2, 1fr); }
  .cgp-res-survey-field-row { grid-template-columns: 1fr; }
}
