/* TIS Feedback Form (tis-feedback.aspx). Builds on css/services-feedback.css */

.tisfb-page .feedback-form-panel {
  padding: 22px;
}

.tisfb-page *,
.tisfb-page *::before,
.tisfb-page *::after {
  box-sizing: border-box;
}

.tisfb-page input,
.tisfb-page select,
.tisfb-page textarea,
.tisfb-page button {
  font-family: inherit;
}

.tisfb-back {
  margin-bottom: 10px;
  text-align: right;
}

.tisfb-back a {
  color: var(--feedback-blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.tisfb-back a:hover {
  color: var(--feedback-teal);
}

/* Sections */
.tisfb-section {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--feedback-border);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.tisfb-section legend {
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  margin: 0 0 4px;
  padding: 0 8px;
  border: 0;
  color: var(--feedback-blue);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.tisfb-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--feedback-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.tisfb-step i {
  font-size: 12px;
}

.tisfb-question {
  margin: 4px 0 12px;
  color: var(--feedback-text);
  font-size: 14px;
  font-weight: 700;
}

.tisfb-hint {
  display: block;
  margin: -2px 0 8px;
  color: var(--feedback-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

/* Dropdowns with optgroup */
.tisfb-select optgroup {
  color: var(--feedback-blue);
  font-style: normal;
  font-weight: 800;
}

.tisfb-select optgroup option {
  color: var(--feedback-text);
  font-weight: 400;
}

/* Radio pills (RadioButtonList, RepeatLayout=Flow) */
.tisfb-pills {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tisfb-pills input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  pointer-events: none;
}

.tisfb-pills label {
  display: inline-flex !important;
  align-items: center;
  min-height: 44px;
  margin: 0 !important;
  padding: 9px 16px;
  border: 1px solid #7b93a6;
  border-radius: 999px;
  background: #fff;
  color: var(--feedback-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.tisfb-pills label:hover {
  border-color: var(--feedback-teal);
}

.tisfb-pills input[type="radio"]:focus + label {
  box-shadow: 0 0 0 3px rgba(13, 143, 157, .22);
}

.tisfb-pills input[type="radio"]:checked + label {
  border-color: var(--feedback-blue);
  background: var(--feedback-blue);
  color: #fff;
}

.tisfb-pills br {
  display: none;
}

.tisfb-pills-sm label {
  min-height: 44px;
  padding: 7px 18px;
}

/* Service assessment matrix */
.tisfb-matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--feedback-border);
  border-radius: 7px;
}

.tisfb-matrix {
  width: 100%;
  min-width: 640px;
  margin: 0;
  border-collapse: collapse;
  font-size: 13.5px;
}

.tisfb-matrix th,
.tisfb-matrix td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--feedback-border);
  text-align: center;
  vertical-align: middle;
}

.tisfb-matrix thead th {
  background: var(--feedback-soft);
  color: var(--feedback-blue);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.3;
}

.tisfb-matrix tbody th {
  color: var(--feedback-text);
  font-weight: 700;
  text-align: left;
}

.tisfb-matrix .tisfb-area {
  text-align: left;
  width: 30%;
}

.tisfb-matrix tbody tr:last-child th,
.tisfb-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.tisfb-matrix tbody tr:hover {
  background: #fbfdfe;
}

.tisfb-matrix input[type="radio"] {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--feedback-blue);
  cursor: pointer;
}

.tisfb-rate-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tisfb-actions {
  padding-top: 4px;
}

/* Accessibility: stronger borders and text contrast on this page (WCAG 1.4.3 / 1.4.11) */
.tisfb-page .feedback-heading span,
.tisfb-page .feedback-section-title span {
  color: #0b7380;
}

.tisfb-page .feedback-control,
.tisfb-page .form-control {
  border-color: #7b93a6 !important;
}

.tisfb-page .feedback-control:focus,
.tisfb-page .form-control:focus,
.tisfb-newcode:focus,
.tisfb-back a:focus,
.feedback-alert-button:focus,
.feedback-alert-close:focus {
  outline: 3px solid #0b7380 !important;
  outline-offset: 2px;
}

.tisfb-matrix input[type="radio"]:focus-visible {
  outline: 3px solid #0b7380;
  outline-offset: 2px;
}

.tisfb-group-label {
  display: block;
  margin: 0 0 8px;
  color: var(--feedback-text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

/* Captcha (NSD style, 4 digits) */
.tisfb-captcha {
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
}

.tisfb-captcha-image {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tisfb-captcha-image img {
  width: 110px;
  height: 46px;
  border-radius: 6px;
}

.tisfb-newcode {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #7b93a6;
  border-radius: 6px;
  background: #fff;
  color: var(--feedback-blue);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.tisfb-newcode:hover {
  border-color: var(--feedback-blue);
}

.tisfb-captcha-label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
}

.tisfb-code {
  max-width: 160px;
  letter-spacing: 4px;
  font-size: 18px !important;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .tisfb-pills label { transition: none; }
}

/* Phones: matrix becomes one card per assessment area */
@media (max-width: 640px) {
  .tisfb-page .feedback-form-panel,
  .tisfb-section {
    padding: 14px;
  }

  .tisfb-matrix-wrap {
    overflow: visible;
    border: 0;
  }

  .tisfb-matrix {
    min-width: 0;
  }

  .tisfb-matrix thead {
    display: none;
  }

  .tisfb-matrix,
  .tisfb-matrix tbody,
  .tisfb-matrix tr,
  .tisfb-matrix th,
  .tisfb-matrix td {
    display: block;
    width: 100%;
  }

  .tisfb-matrix tbody tr {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--feedback-border);
    border-radius: 7px;
  }

  .tisfb-matrix tbody th {
    padding: 0 0 4px;
    border: 0;
  }

  .tisfb-matrix tbody td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
  }

  .tisfb-matrix tbody td input[type="radio"] {
    position: absolute;
    opacity: 0;
  }

  .tisfb-matrix input[type="radio"]:focus-visible + .tisfb-rate-text {
    outline: 3px solid #0b7380;
    outline-offset: 2px;
  }

  .tisfb-captcha {
    grid-template-columns: 1fr;
  }

  .tisfb-matrix .tisfb-rate-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #7b93a6;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
  }

  .tisfb-matrix input[type="radio"]:checked + .tisfb-rate-text {
    border-color: var(--feedback-blue);
    background: var(--feedback-blue);
    color: #fff;
  }

  .tisfb-pills label {
    padding: 8px 13px;
    font-size: 13px;
  }
}


/* ------------------------------------------------------------------
   Lighter layout (2026-10-03): fewer borders, compact captcha.
   !important is used where the site theme adds its own table/button styles.
   ------------------------------------------------------------------ */

/* Sections: no box, just a divider line between them */
.tisfb-page .tisfb-section {
  margin: 0 0 22px;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid var(--feedback-border);
  border-radius: 0;
  background: transparent;
}

.tisfb-page .tisfb-section legend {
  margin-bottom: 12px;
  padding: 0;
}

.tisfb-page .tisfb-actions {
  padding-top: 0;
}

/* Rating table: only soft row lines, no cell grid */
.tisfb-page .tisfb-matrix-wrap {
  border: 0;
  border-radius: 0;
}

.tisfb-page .tisfb-matrix,
.tisfb-page .tisfb-matrix th,
.tisfb-page .tisfb-matrix td {
  border: 0 !important;
  background: transparent !important;
}

.tisfb-page .tisfb-matrix thead th {
  border-bottom: 2px solid var(--feedback-border) !important;
  background: transparent !important;
}

.tisfb-page .tisfb-matrix tbody th,
.tisfb-page .tisfb-matrix tbody td {
  border-bottom: 1px solid #edf2f6 !important;
}

.tisfb-page .tisfb-matrix tbody tr:last-child th,
.tisfb-page .tisfb-matrix tbody tr:last-child td {
  border-bottom: 0 !important;
}

.tisfb-page .tisfb-matrix tbody tr:hover th,
.tisfb-page .tisfb-matrix tbody tr:hover td {
  background: #f7fafc !important;
}

/* Captcha: plain row, short code box */
.tisfb-page .tisfb-captcha {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.tisfb-page .tisfb-captcha-image {
  flex-wrap: nowrap;
}

.tisfb-page .tisfb-captcha-image img {
  border: 1px solid var(--feedback-border);
}

.tisfb-page .tisfb-captcha > div:last-child {
  flex: 1 1 260px;
}

.tisfb-page .tisfb-code,
.tisfb-page input.tisfb-code.form-control {
  width: 150px !important;
  max-width: 150px !important;
}

.tisfb-page .tisfb-newcode,
.tisfb-page input.tisfb-newcode {
  min-height: 46px !important;
  padding: 8px 14px !important;
  border: 1px solid #7b93a6 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--feedback-blue) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  box-shadow: none !important;
  cursor: pointer;
}

.tisfb-page .tisfb-newcode:hover {
  border-color: var(--feedback-blue) !important;
  background: #f7fafc !important;
}

@media (max-width: 640px) {
  .tisfb-page .tisfb-section {
    padding: 0 0 18px;
  }

  .tisfb-page .tisfb-matrix tbody tr {
    border: 0;
    border-bottom: 1px solid var(--feedback-border);
    border-radius: 0;
    padding: 10px 0;
  }
}


/* Captcha layout v3: label, then image + New code + code box on one line, hint below */
.tisfb-page .tisfb-captcha2 {
  display: block;
}

.tisfb-page .tisfb-captcha-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.tisfb-page .tisfb-captcha-img {
  display: block;
  width: 110px;
  height: 46px;
  border: 1px solid var(--feedback-border);
  border-radius: 6px;
  background: #fff;
}

.tisfb-page .tisfb-captcha-line .tisfb-newcode,
.tisfb-page .tisfb-captcha-line input.tisfb-code.form-control {
  height: 46px !important;
  min-height: 46px !important;
  margin: 0 !important;
}

.tisfb-page .tisfb-captcha-line input.tisfb-code.form-control {
  width: 140px !important;
  max-width: 140px !important;
  padding: 8px 12px !important;
  font-size: 18px !important;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
}

.tisfb-page .tisfb-captcha-line input.tisfb-code::placeholder {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 1px;
}

.tisfb-page .tisfb-captcha-help {
  margin: 0;
}


/* Section colours: each step has its own colour (all pass 4.5:1 on white) */
.tisfb-page fieldset.tisfb-section:nth-of-type(1) { --step-color: #0a4074; } /* 1 User Information - navy */
.tisfb-page fieldset.tisfb-section:nth-of-type(2) { --step-color: #0b7380; } /* 2 Service - teal */
.tisfb-page fieldset.tisfb-section:nth-of-type(3) { --step-color: #2e7d32; } /* 3 Overall Satisfaction - green */
.tisfb-page fieldset.tisfb-section:nth-of-type(4) { --step-color: #6a3d9a; } /* 4 Service Assessment - purple */
.tisfb-page fieldset.tisfb-section:nth-of-type(5) { --step-color: #b45309; } /* 5 Your Feedback - amber */
.tisfb-page fieldset.tisfb-section:nth-of-type(6) { --step-color: #3949ab; } /* 6 Follow-up - indigo */
.tisfb-page fieldset.tisfb-section:nth-of-type(7) { --step-color: #9f1239; } /* Human Verification - crimson */

.tisfb-page .tisfb-section legend {
  color: var(--step-color, var(--feedback-blue));
}

.tisfb-page .tisfb-section .tisfb-step {
  background: var(--step-color, var(--feedback-blue));
}


/* Field labels smaller than section headings (theme makes labels large) */
.tisfb-page .feedback-field > label,
.tisfb-page .tisfb-group-label,
.tisfb-page .tisfb-captcha-label,
.tisfb-page .tisfb-question {
  margin: 0 0 6px !important;
  color: #1f2937 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.tisfb-page .tisfb-section legend {
  font-size: 17px !important;
}
