/* shell.css — page chrome shared by both funnel steps.
   Mirrors the issuer's own application layout: white brand bar, navy product
   bar, green progress, info disclosure, form card with a right-hand side rail. */

:root {
  --shell-navy: #00175a;
  --shell-ink: #1a1a1a;
  --shell-muted: #5b6570;
  --shell-line: #d8dde3;
  --shell-blue: #0068bf;
  --shell-infobg: #e9f4fb;
  --shell-infoborder: #b6ddf1;
  --shell-green: #2f7d32;
}

body.qk-shell {
  background: #f2f2f2;
  color: var(--shell-ink);
  font-family: 'Optimist', 'Segoe UI', Arial, sans-serif;
}

.qk-brandbar {
  background: #fff;
  text-align: center;
  padding: 14px 16px 12px;
}

.qk-brandbar img { width: 150px; height: auto; display: inline-block; }

.qk-productbar {
  background: var(--shell-navy);
  color: #fff;
  padding: 12px 20px;
}

.qk-productbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.qk-productbar img {
  width: 74px;
  height: auto;
  border-radius: 3px;
  display: block;
}

.qk-productbar strong { font-size: 1.05em; font-weight: 600; }

.qk-productbar nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 0.86em;
  align-items: center;
}

/* The vendor floats the language toggle; the bar lays it out in the flex row. */
.qk-productbar nav #lang-toggle { margin-left: 6px !important; }

.qk-productbar nav a {
  color: #fff !important;
  text-decoration: underline;
  white-space: nowrap;
  font-size: inherit;
  font-weight: 400;
  padding: 0;
  border: 0;
  background: none;
}

/* The vendor styles #lang-toggle as a boxed button; the bar wants a plain link. */
.qk-productbar #lang-toggle,
.qk-shell #lang-toggle {
  display: inline-block !important;
  position: static !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
  top: auto !important;
  right: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4;
  border-radius: 0;
  border: 0 !important;
  background: none !important;
  color: #fff !important;
  font-size: inherit;
  font-weight: 400;
  text-decoration: underline;
  transform: none !important;
}

.qk-progress {
  height: 6px;
  background: #d7d7d7;
}

.qk-progress span {
  display: block;
  height: 100%;
  background: var(--shell-green);
  transition: width 0.3s;
}

.qk-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 20px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 22px;
  align-items: start;
}

/* ---- information disclosure ---- */

.qk-info {
  border: 1px solid var(--shell-infoborder);
  background: var(--shell-infobg);
  border-radius: 5px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.qk-info > summary {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #0a4f8a;
}

.qk-info > summary::-webkit-details-marker { display: none; }

.qk-info .qk-i {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--shell-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.qk-info[open] > summary { margin-bottom: 10px; }

.qk-info .qk-toggle {
  display: inline-block;
  margin: 2px 0 10px 28px;
  font-size: 0.88em;
  font-weight: 600;
  color: #0a4f8a;
  cursor: pointer;
}

.qk-info[open] .qk-toggle .show { display: none; }
.qk-info:not([open]) .qk-toggle .hide { display: none; }

/* The vendor forces details/summary content to a fixed display; keep ours sane. */
.qk-info > summary { display: flex; }
.qk-info ol { display: block; }

.qk-info ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.qk-info li {
  counter-increment: step;
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  font-size: 0.9em;
  line-height: 1.45;
}

.qk-info li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--shell-navy);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

/* ---- offer banner ---- */

#annual-fee-offer-box {
  border: 1px solid #cfe3c9;
  background: #f2f9ef;
  border-radius: 5px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.94em;
}

#offer-alert { flex: 1; }

#offer-alert .save { font-weight: 700; }

#annual-fee-offer-close {
  flex: none;
  border: 0;
  background: none;
  font-size: 1.15em;
  line-height: 1;
  color: #3f6b39;
  cursor: pointer;
  padding: 2px 4px;
}

/* ---- form card ---- */

.qk-card {
  background: #fff;
  border: 1px solid var(--shell-line);
  border-radius: 5px;
  padding: 24px 26px 26px;
}

.qk-card h1,
.qk-card h2 {
  margin: 0 0 4px;
  font-size: 1.16em;
  font-weight: 600;
  color: var(--shell-ink);
}

.qk-card h2 { margin-top: 26px; }

.qk-card .qk-mandatory {
  margin: 0 0 18px;
  font-size: 0.86em;
  color: var(--shell-muted);
}

.qk-label {
  display: block;
  margin: 0 0 5px;
  font-size: 0.9em;
  font-weight: 500;
  color: #33404c;
}

.qk-label .qk-badge {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border: 1px solid #9aa6b2;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
  color: #6b7885;
  cursor: help;
  vertical-align: 1px;
}

.qk-label .qk-opt { font-weight: 400; color: var(--shell-muted); }

.qk-input {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  margin: 0;
  font: inherit;
  font-size: 16px;
  color: inherit;
  background: #fff;
  border: 1px solid #9aa6b2;
  border-radius: 3px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.qk-input:focus {
  outline: 0;
  border-color: var(--shell-blue);
  box-shadow: 0 0 0 3px rgb(0 104 191 / 18%);
}

.qk-input[aria-invalid='true'] { border-color: #c0392b; }

/* Currency fields: the sign is drawn inside the input, so the field starts
   with it and disappears as soon as a value is present. */
.qk-prefix { position: relative; display: block; }

.qk-prefix .qk-input { padding-left: 26px; }

.qk-prefix::before {
  content: '$';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7885;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
}

/* Hidden by default and once the field has a value; shown on focus when empty. */
.qk-prefix:focus-within::before { opacity: 1; }
.qk-prefix.is-filled::before { opacity: 0 !important; }

select.qk-input {
  padding-right: 34px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23515f6c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

select.qk-input:invalid { color: #6b7885; }

.qk-row {
  display: grid;
  gap: 16px;
  margin-bottom: 0;
}

/* Consecutive rows keep one even gap. */
.qk-row + .qk-row { margin-top: 14px; }

.qk-row.two { grid-template-columns: 1fr 1fr; }
.qk-row.thirds { grid-template-columns: 1fr 1fr 1fr; }

.qk-row.field-gap { margin-bottom: 0; }

.qk-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid #eceff2; }
.qk-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

.qk-err {
  display: none;
  margin: 5px 0 0;
  font-size: 0.84em;
  font-weight: 600;
  color: #c0392b;
}

.qk-hint {
  margin: 5px 0 0;
  font-size: 0.83em;
  line-height: 1.4;
  color: var(--shell-muted);
}

.qk-hint a { color: var(--shell-blue); }

/* ---- radios ---- */

.qk-choices { display: flex; gap: 22px; margin: 0 0 6px; }

.qk-choices label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94em;
  cursor: pointer;
}

.qk-choices input[type='radio'] {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
  border: 1px solid #8b98a5;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.qk-choices input[type='radio']:checked { border: 5px solid var(--shell-blue); }
.qk-choices input[type='radio']:focus-visible {
  outline: 3px solid rgb(0 104 191 / 22%);
  outline-offset: 2px;
}

.qk-choices input[aria-invalid='true'] { border-color: #c0392b; }

/* ---- password-style reveal ---- */

.qk-reveal { position: relative; }

.qk-reveal .qk-input { padding-right: 42px; }

.qk-reveal button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #55636f;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.qk-reveal button:hover { background: #eef2f6; }
.qk-reveal svg { width: 18px; height: 18px; }

/* ---- consent note ---- */

.qk-consentnote {
  border: 1px solid var(--shell-infoborder);
  background: var(--shell-infobg);
  border-radius: 5px;
  padding: 14px 16px;
  margin: 22px 0 18px;
  font-size: 0.84em;
  line-height: 1.55;
  color: #234;
}

.qk-consentnote p { margin: 0 0 9px; }
.qk-consentnote p:last-child { margin-bottom: 0; }
.qk-consentnote a { color: var(--shell-blue); }

.qk-actions {
  border-top: 1px solid #eceff2;
  margin-top: 4px;
  padding-top: 20px;
  text-align: center;
}

.qk-submit {
  min-width: 210px;
  padding: 12px 26px;
  border: 0;
  border-radius: 4px;
  background: var(--shell-blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.qk-submit:hover { background: #00559b; }
.qk-submit:disabled { background: #7fa9cc; cursor: default; }

.qk-quebec {
  margin: 16px 0 0;
  font-size: 0.79em;
  line-height: 1.5;
  color: var(--shell-muted);
}

.qk-quebec a { color: var(--shell-blue); }

/* ---- side rail ---- */

.qk-side { font-size: 0.88em; }

.qk-side img {
  width: 100% !important;
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--shell-line);
  border-radius: 4px;
  background: #fff;
}

.qk-side h2 {
  margin: 10px 0 14px;
  font-size: 1.06em;
  font-weight: 600;
}

.qk-side ul { margin: 0; padding: 0; list-style: none; }
.qk-side li { display: flex; gap: 9px; margin-bottom: 12px; line-height: 1.4; }
.qk-side li span:first-child { flex: none; color: var(--shell-blue); }
.qk-side a { color: var(--shell-blue); }

.qk-errors {
  display: none;
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid #e5b4ae;
  border-left: 4px solid #c0392b;
  border-radius: 4px;
  background: #fdeeec;
  color: #8d1a17;
  font-size: 0.9em;
}

footer.qk-foot {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 34px;
  font-size: 0.79em;
  line-height: 1.5;
  color: var(--shell-muted);
}

footer.qk-foot p { margin: 0 0 5px; }

@media (max-width: 860px) {
  .qk-page { grid-template-columns: minmax(0, 1fr); }
  .qk-side { order: -1; display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
  .qk-side h2 { margin: 0 0 6px; }
  .qk-side ul { grid-column: 2; }
  .qk-row.two, .qk-row.thirds { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .qk-page { padding: 12px 12px 30px; }
  .qk-card { padding: 18px 15px 20px; border-radius: 0; }
  .qk-productbar { padding: 10px 12px; }
  .qk-productbar-inner { gap: 9px; flex-wrap: wrap; }
  .qk-productbar img { width: 58px; }
  .qk-productbar strong { font-size: 0.9em; }
  .qk-productbar nav { gap: 12px; font-size: 0.78em; width: 100%; margin-left: 0; }
  .qk-side { grid-template-columns: 76px 1fr; }
}
