/* UK Scam Check – v3.2 (elegant palette + straight right-side grid alignment) */

.webform-submission-form .scamcheck.sc-v3 {
  --ink: #121629;
  --muted: rgba(18, 22, 41, 0.70);

  --line: rgba(18, 22, 41, 0.10);
  --line2: rgba(18, 22, 41, 0.16);

  --shadow2: 0 12px 30px rgba(18,22,41,0.08);

  /* Softer, more elegant accents */
  --blue: #2b6fe8;
  --violet: #6a57f6;

  /* Risk colours (still obvious, less harsh) */
  --green: #1b8750;
  --amber: #d7a21a;
  --red: #cf3f3f;

  color: var(--ink);
}

/* Cards */
.webform-submission-form .scamcheck.sc-v3 .sc-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow2);
  background: #ffffff;
  padding: 16px;
  margin: 0 0 14px;
}

/* Hero: refined gradients */
.webform-submission-form .scamcheck.sc-v3 .sc-hero {
  border: 1px solid var(--line2);
  background:
    radial-gradient(900px 240px at 15% 0%, rgba(43,111,232,0.14), transparent 60%),
    radial-gradient(900px 240px at 60% 0%, rgba(106,87,246,0.12), transparent 60%),
    radial-gradient(900px 240px at 85% 0%, rgba(27,135,80,0.10), transparent 60%),
    linear-gradient(180deg, #fbfdff 0%, #ffffff 60%);
}

.webform-submission-form .scamcheck.sc-v3 .sc-hero__title {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 6px;
}

.webform-submission-form .scamcheck.sc-v3 .sc-hero__desc,
.webform-submission-form .scamcheck.sc-v3 .sc-hero__note {
  color: var(--muted);
}

.webform-submission-form .scamcheck.sc-v3 .sc-hero__note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(215,162,26,0.50);
  background: rgba(215,162,26,0.12);
  color: rgba(18,22,41,0.86);
}

/* Layout */
.webform-submission-form .scamcheck.sc-v3 .sc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 980px) {
  .webform-submission-form .scamcheck.sc-v3 .sc-layout {
    grid-template-columns: 1.45fr 0.55fr;
    align-items: start;
  }
}

/* Sticky right column */
@media (min-width: 980px) {
  .webform-submission-form .scamcheck.sc-v3 .sc-sidecard {
    position: sticky;
    top: 16px;
  }
}

/* Tighten webform descriptions */
.webform-submission-form .scamcheck.sc-v3 .webform-element-description,
.webform-submission-form .scamcheck.sc-v3 .description {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

/* Base widget style */
.webform-submission-form .scamcheck.sc-v3 select,
.webform-submission-form .scamcheck.sc-v3 textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line2);
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(43,111,232,0.05) 0%, #ffffff 75%);
}

.webform-submission-form .scamcheck.sc-v3 textarea {
  background: #ffffff;
  min-height: 150px;
}

.webform-submission-form .scamcheck.sc-v3 select:focus,
.webform-submission-form .scamcheck.sc-v3 textarea:focus {
  outline: none;
  border-color: rgba(43,111,232,0.60);
  box-shadow: 0 0 0 4px rgba(43,111,232,0.14);
}

/* Result header */
.webform-submission-form .scamcheck.sc-v3 .sc-result__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.webform-submission-form .scamcheck.sc-v3 .sc-result__title {
  font-weight: 900;
  margin: 0;
}

.webform-submission-form .scamcheck.sc-v3 .sc-result__sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

/* Risk panel (still very obvious, but softer) */
.webform-submission-form .scamcheck.sc-v3 .sc-riskpanel {
  border-radius: 16px;
  border: 1px solid var(--line2);
  padding: 14px;
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 12px;
  margin: 8px 0 12px;
}

@media (max-width: 760px) {
  .webform-submission-form .scamcheck.sc-v3 .sc-riskpanel {
    grid-template-columns: 1fr;
  }
}

.webform-submission-form .scamcheck.sc-v3 .sc-riskpanel__label {
  font-size: 12px;
  font-weight: 900;
  color: rgba(18,22,41,0.68);
  margin-bottom: 6px;
}

.webform-submission-form .scamcheck.sc-v3 .sc-riskpanel__value {
  font-size: 22px;
  font-weight: 900;
}

.webform-submission-form .scamcheck.sc-v3 .sc-riskpanel__hint {
  color: rgba(18,22,41,0.86);
  font-size: 13px;
  line-height: 1.4;
  padding-top: 18px;
}

@media (max-width: 760px) {
  .webform-submission-form .scamcheck.sc-v3 .sc-riskpanel__hint {
    padding-top: 0;
  }
}

.webform-submission-form .scamcheck.sc-v3 .sc-riskpanel--low {
  background: linear-gradient(180deg, rgba(27,135,80,0.18) 0%, #ffffff 78%);
  border-color: rgba(27,135,80,0.52);
}

.webform-submission-form .scamcheck.sc-v3 .sc-riskpanel--med {
  background: linear-gradient(180deg, rgba(215,162,26,0.20) 0%, #ffffff 78%);
  border-color: rgba(215,162,26,0.62);
}

.webform-submission-form .scamcheck.sc-v3 .sc-riskpanel--high {
  background: linear-gradient(180deg, rgba(207,63,63,0.18) 0%, #ffffff 78%);
  border-color: rgba(207,63,63,0.62);
}

/* Reply options */
.webform-submission-form .scamcheck.sc-v3 .sc-replies {
  margin: 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background:
    radial-gradient(700px 160px at 12% 0%, rgba(106,87,246,0.10), transparent 60%),
    linear-gradient(180deg, rgba(43,111,232,0.05) 0%, #ffffff 75%);
}

.webform-submission-form .scamcheck.sc-v3 .sc-replies__title {
  font-weight: 900;
  margin: 0 0 8px;
}

.webform-submission-form .scamcheck.sc-v3 .sc-replyrow__label {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  margin: 10px 0 6px;
}

.webform-submission-form .scamcheck.sc-v3 .sc-pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfbff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

/* Box grid */
.webform-submission-form .scamcheck.sc-v3 .sc-boxgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 760px) {
  .webform-submission-form .scamcheck.sc-v3 .sc-boxgrid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1120px) {
  .webform-submission-form .scamcheck.sc-v3 .sc-boxgrid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.webform-submission-form .scamcheck.sc-v3 .sc-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #ffffff;
}

.webform-submission-form .scamcheck.sc-v3 .sc-box__label {
  font-weight: 900;
  margin: 0 0 8px;
}

.webform-submission-form .scamcheck.sc-v3 .sc-box--why {
  border-left: 6px solid rgba(215,162,26,0.92);
  background: linear-gradient(180deg, rgba(215,162,26,0.12) 0%, #ffffff 75%);
}

.webform-submission-form .scamcheck.sc-v3 .sc-box--steps {
  border-left: 6px solid rgba(43,111,232,0.92);
  background: linear-gradient(180deg, rgba(43,111,232,0.08) 0%, #ffffff 75%);
}

.webform-submission-form .scamcheck.sc-v3 .sc-box--evidence {
  border-left: 6px solid rgba(27,135,80,0.92);
  background: linear-gradient(180deg, rgba(27,135,80,0.08) 0%, #ffffff 75%);
}

.webform-submission-form .scamcheck.sc-v3 .sc-list,
.webform-submission-form .scamcheck.sc-v3 .sc-steps {
  margin: 0;
  padding-left: 18px;
}

/* =========================
   Right-side alignment fix
   ========================= */

/* Keep the side header full width */
.webform-submission-form .scamcheck.sc-v3 .sc-sidehead {
  margin-bottom: 10px;
}

.webform-submission-form .scamcheck.sc-v3 .sc-sidehead__title {
  font-weight: 900;
  margin: 0 0 4px;
}

.webform-submission-form .scamcheck.sc-v3 .sc-sidehead__sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

/* Make the selection controls a true grid with consistent rows */
@media (min-width: 760px) {
  .webform-submission-form .scamcheck.sc-v3 .sc-sidecard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
    row-gap: 12px;
    align-items: start;
  }

  .webform-submission-form .scamcheck.sc-v3 .sc-sidecard .sc-sidehead {
    grid-column: 1 / -1;
  }
}

/* Turn each form item into a 2-row mini-grid: label then input */
.webform-submission-form .scamcheck.sc-v3 .sc-sidecard .form-item {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  margin: 0;
}

/* Force consistent label spacing */
.webform-submission-form .scamcheck.sc-v3 .sc-sidecard .form-item > label {
  margin: 0 0 6px;
  line-height: 1.15;
}

/* Ensure selects align in height */
.webform-submission-form .scamcheck.sc-v3 .sc-sidecard select {
  min-height: 44px;
}

/* On narrow screens, keep it single column (no “crooked” wrapping) */
@media (max-width: 759px) {
  .webform-submission-form .scamcheck.sc-v3 .sc-sidecard .form-item {
    margin: 0 0 12px;
  }
}
/* Right-side: keep Selections header clearly above all boxes */
.webform-submission-form .scamcheck.sc-v3 .sc-sidecard .sc-sidehead {
  grid-column: 1 / -1;
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(18,22,41,0.10);
}

/* Right-side: make every label occupy the same vertical space */
.webform-submission-form .scamcheck.sc-v3 .sc-sidecard .form-item > label {
  font-size: 12.5px;
  letter-spacing: 0.1px;
  min-height: 32px;            /* key: consistent alignment */
  display: flex;
  align-items: flex-end;        /* aligns label baselines */
  line-height: 1.15;
  margin: 0 0 6px;
}

/* If a label is very long, let it wrap but stay inside the fixed label area */
.webform-submission-form .scamcheck.sc-v3 .sc-sidecard .form-item > label {
  overflow-wrap: anywhere;
}

/* Keep inputs aligned even when labels wrap */
.webform-submission-form .scamcheck.sc-v3 .sc-sidecard select {
  min-height: 44px;
}

/* Desktop grid spacing slightly tighter so it feels structured */
@media (min-width: 760px) {
  .webform-submission-form .scamcheck.sc-v3 .sc-sidecard {
    row-gap: 12px;
    column-gap: 12px;
  }
}
