/*!
 * Hennepin Healthcare - LuxSci Form Standard
 * hh-forms.css  v1.0.0  (2026-12-01)
 *
 * One stylesheet for every Hennepin Healthcare form hosted in the LuxSci
 * form builder. It sits on top of Bootstrap 3 (3.3.x / 3.4.x).
 *
 * HOW TO USE
 *   1. Link this file from the LuxSci form builder (external style sheet).
 *   2. Wrap the whole form body in  <div class="hh-form"> ... </div>
 *   3. Inside the wrapper, write ordinary Bootstrap 3 form markup
 *      (.form-group, .control-label, .form-control, .row / .col-sm-*,
 *      .checkbox, .radio, .help-block, .btn ...).
 *
 * Every rule is scoped under .hh-form, so it outranks Bootstrap whichever
 * file loads first and never touches anything outside the wrapper.
 * No web fonts, images or other third-party requests are made.
 *
 * PAGE SKELETON
 *   <div class="hh-form">
 *     <header class="hh-header">
 *       <img class="hh-logo" src="..." alt="Hennepin Healthcare">
 *       <address class="hh-header-contact"> clinic, address, phone </address>
 *     </header>
 *     <h1 class="hh-title">Form title</h1>
 *     <p class="hh-intro">One or two sentences on what the form is for.</p>
 *     <p class="hh-required-note">Fields marked * are required.</p>
 *     <form>
 *       <fieldset class="hh-section">
 *         <legend>Section name</legend>
 *         <div class="form-group required">
 *           <label class="control-label" for="x">Label</label>
 *           <input class="form-control" id="x" name="x" required>
 *           <p class="help-block">Optional hint.</p>
 *         </div>
 *       </fieldset>
 *       <div class="hh-actions">
 *         <button type="submit" class="btn btn-primary">Submit</button>
 *       </div>
 *     </form>
 *     <footer class="hh-footer"><span>Form name</span><span>MM/YYYY</span></footer>
 *   </div>
 *
 * CLASS REFERENCE (everything else is plain Bootstrap 3)
 *   .hh-form               required wrapper; sets width, type and colors
 *   .hh-form--card         optional: draws the form as a bordered card
 *   .hh-header             logo + clinic contact block
 *   .hh-logo               logo image
 *   .hh-header-contact     clinic name / address / phone
 *   .hh-title              form title band
 *   .hh-intro              purpose statement under the title
 *   .hh-required-note      "* required" key
 *   .hh-section            a <fieldset>; its <legend> is the section heading
 *   .hh-legend-note        lighter text inside a legend, e.g. "(if available)"
 *   .form-group.required   adds the red * after the label
 *   .hh-optional           lighter "(optional)" text inside a label
 *   .hh-check-group        lays checkboxes / radios out in a wrapping row
 *   .hh-check-group--stacked   same, one per line
 *   .hh-signature-pad      box that holds LuxSci's drawn-signature pad
 *                          (house size: 380 x 130, full width on a phone)
 *   .hh-note               boxed instruction / notice (add --warning for amber)
 *   .hh-actions            button row at the end of the form
 *   .hh-error-summary      error banner (inserted by hh-forms.js)
 *   .hh-footer             form name + revision date
 *   .hh-no-print           hide an element when the page is printed
 *
 * CONTENTS
 *   1 Tokens   2 Wrapper   3 Header & title   4 Sections   5 Labels & help
 *   6 Inputs   7 Checkboxes & radios   8 Buttons   9 Validation & alerts
 *   10 Notes, signature pad, footer   11 Small screens   12 Print
 */


/* 1. TOKENS ------------------------------------------------------------
   Change a value here and every form follows. --hh-brand is taken from
   the logo artwork; replace it if the brand guide gives an official color. */

:root {
  --hh-brand:          #181717;   /* headings rules, primary button */
  --hh-brand-dark:     #000000;   /* primary button hover / pressed */
  --hh-on-brand:       #ffffff;   /* text on --hh-brand */

  --hh-text:           #1f2328;
  --hh-text-muted:     #59616b;
  --hh-link:           #0b5cad;

  --hh-border:         #d4d8dd;   /* dividers and boxes */
  --hh-border-input:   #767e87;   /* field outlines (3:1 or better on white) */
  --hh-surface:        #f2f3f5;   /* title band, notes, read-only fields */
  --hh-background:     #ffffff;

  --hh-focus:          #0b5cad;
  --hh-focus-ring:     rgba(11, 92, 173, 0.28);

  --hh-danger:         #b42318;
  --hh-danger-bg:      #fdf2f1;
  --hh-success:        #1a6b3b;
  --hh-success-bg:     #eff8f2;
  --hh-warning:        #8a5a00;
  --hh-warning-bg:     #fff8e6;

  --hh-font:           "Helvetica Neue", Helvetica, Arial, sans-serif;
  --hh-font-size:      16px;      /* 16px stops phones zooming into fields */
  --hh-control-height: 44px;      /* comfortable touch target */
  --hh-radius:         4px;
  --hh-max-width:      820px;
}


/* 2. WRAPPER ----------------------------------------------------------- */

.hh-form {
  box-sizing: border-box;
  max-width: var(--hh-max-width);
  margin: 0 auto;
  padding: 24px 20px 32px;
  font-family: var(--hh-font);
  font-size: var(--hh-font-size);
  line-height: 1.5;
  color: var(--hh-text);
  background: var(--hh-background);
  -webkit-text-size-adjust: 100%;
}

.hh-form *,
.hh-form *::before,
.hh-form *::after {
  box-sizing: border-box;
}

.hh-form.hh-form--card {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 32px 36px 36px;
  border: 1px solid var(--hh-border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.hh-form p {
  margin: 0 0 12px;
}

.hh-form a {
  color: var(--hh-link);
  text-decoration: underline;
}

.hh-form a:hover,
.hh-form a:focus {
  color: var(--hh-brand);
}

.hh-form a:focus-visible {
  outline: 3px solid var(--hh-focus);
  outline-offset: 2px;
  border-radius: 2px;
}


/* 3. HEADER & TITLE ---------------------------------------------------- */

.hh-form .hh-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin: 0 0 20px;
}

.hh-form .hh-logo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
}

.hh-form .hh-header-contact {
  margin: 0;
  font-size: 14px;
  font-style: normal;
  line-height: 1.45;
  color: var(--hh-text-muted);
  text-align: right;
}

.hh-form .hh-header-contact strong {
  color: var(--hh-text);
}

.hh-form .hh-header-contact a {
  color: inherit;
}

.hh-form .hh-title {
  margin: 0 0 18px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hh-text);
  text-align: center;
  background: var(--hh-surface);
  border: 1px solid var(--hh-border);
  border-radius: var(--hh-radius);
}

.hh-form .hh-intro {
  margin: 0 0 12px;
  font-style: italic;
}

.hh-form .hh-required-note {
  margin: 0;
  font-size: 14px;
  color: var(--hh-text-muted);
}

.hh-form .hh-req {
  font-weight: 700;
  color: var(--hh-danger);
}


/* 4. SECTIONS ---------------------------------------------------------- */

.hh-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.hh-form .hh-section {
  margin-top: 28px;
}

.hh-form legend {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--hh-brand);
  border: 0;
  border-bottom: 2px solid var(--hh-brand);
}

.hh-form .hh-legend-note {
  font-weight: 400;
  color: var(--hh-text-muted);
}


/* 5. LABELS & HELP TEXT ------------------------------------------------ */

.hh-form .form-group {
  margin-bottom: 18px;
}

.hh-form label,
.hh-form .control-label {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 6px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--hh-text);
  text-align: left;
}

.hh-form .form-group.required > label::after,
.hh-form .form-group.required > .control-label::after {
  content: " *";
  font-weight: 700;
  color: var(--hh-danger);
}

.hh-form .hh-optional {
  font-weight: 400;
  color: var(--hh-text-muted);
}

.hh-form .help-block {
  display: block;
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--hh-text-muted);
}


/* 6. INPUTS ------------------------------------------------------------ */

.hh-form .form-control {
  display: block;
  width: 100%;
  height: var(--hh-control-height);
  min-height: var(--hh-control-height);
  padding: 9px 12px;
  font-family: inherit;
  font-size: var(--hh-font-size);
  line-height: 1.5;
  color: var(--hh-text);
  background-color: #ffffff;
  border: 1px solid var(--hh-border-input);
  border-radius: var(--hh-radius);
  box-shadow: none;
  transition: border-color 0.12s ease-in-out, box-shadow 0.12s ease-in-out;
}

.hh-form .form-control:focus {
  border-color: var(--hh-focus);
  outline: 0;
  box-shadow: 0 0 0 3px var(--hh-focus-ring);
}

.hh-form .form-control::placeholder {
  color: #6f7780;
  opacity: 1;
}

.hh-form textarea.form-control {
  height: auto;
  min-height: 112px;
  resize: vertical;
}

.hh-form select.form-control {
  padding-right: 8px;
}

.hh-form select[multiple].form-control {
  height: auto;
}

/* Bootstrap pins date fields to a 34px line box; realign to our height. */
.hh-form input[type="date"].form-control,
.hh-form input[type="time"].form-control,
.hh-form input[type="datetime-local"].form-control,
.hh-form input[type="month"].form-control {
  line-height: 1.5;
}

.hh-form .form-control[disabled],
.hh-form .form-control[readonly],
.hh-form fieldset[disabled] .form-control {
  color: var(--hh-text-muted);
  background-color: var(--hh-surface);
  border-color: var(--hh-border);
  opacity: 1;
}

.hh-form input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  padding: 8px;
  font-family: inherit;
  font-size: 15px;
  color: var(--hh-text);
  background: #ffffff;
  border: 1px dashed var(--hh-border-input);
  border-radius: var(--hh-radius);
}

.hh-form input[type="file"]:focus {
  border-color: var(--hh-focus);
  outline: 0;
  box-shadow: 0 0 0 3px var(--hh-focus-ring);
}

.hh-form input[type="file"]::file-selector-button {
  margin: 0 12px 0 0;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--hh-text);
  background: var(--hh-surface);
  border: 1px solid var(--hh-border-input);
  border-radius: var(--hh-radius);
  cursor: pointer;
}

.hh-form .input-group-addon {
  padding: 9px 12px;
  font-size: var(--hh-font-size);
  color: var(--hh-text-muted);
  background-color: var(--hh-surface);
  border: 1px solid var(--hh-border-input);
  border-radius: var(--hh-radius);
}

.hh-form .input-group .form-control:not(:first-child),
.hh-form .input-group-addon:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.hh-form .input-group .form-control:not(:last-child),
.hh-form .input-group-addon:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.hh-form .input-group-addon:first-child {
  border-right: 0;
}

.hh-form .input-group-addon:last-child {
  border-left: 0;
}


/* 7. CHECKBOXES & RADIOS ----------------------------------------------- */

.hh-form .checkbox,
.hh-form .radio {
  position: relative;
  display: block;
  margin: 0 0 10px;
}

.hh-form .checkbox label,
.hh-form .radio label,
.hh-form .checkbox-inline,
.hh-form .radio-inline {
  position: relative;
  min-height: 24px;
  margin-bottom: 0;
  padding-left: 32px;
  font-size: var(--hh-font-size);
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
}

.hh-form .checkbox input[type="checkbox"],
.hh-form .checkbox-inline input[type="checkbox"],
.hh-form .radio input[type="radio"],
.hh-form .radio-inline input[type="radio"] {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: 2px 0 0 -32px;
  accent-color: var(--hh-brand);
  cursor: pointer;
}

.hh-form input[type="checkbox"]:focus-visible,
.hh-form input[type="radio"]:focus-visible {
  outline: 3px solid var(--hh-focus);
  outline-offset: 2px;
}

.hh-form .hh-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 0 0 18px;
}

.hh-form .hh-check-group .checkbox,
.hh-form .hh-check-group .radio,
.hh-form .hh-check-group .checkbox-inline,
.hh-form .hh-check-group .radio-inline {
  margin: 0;
}

.hh-form .hh-check-group--stacked {
  flex-direction: column;
  gap: 10px;
}


/* 8. BUTTONS ----------------------------------------------------------- */

.hh-form .btn {
  min-height: var(--hh-control-height);
  padding: 10px 24px;
  font-family: inherit;
  font-size: var(--hh-font-size);
  font-weight: 600;
  line-height: 1.375;
  white-space: normal;
  border-radius: var(--hh-radius);
  box-shadow: none;
  transition: background-color 0.12s ease-in-out, border-color 0.12s ease-in-out;
}

.hh-form .btn:focus,
.hh-form .btn:active:focus {
  outline: 0;
}

.hh-form .btn:focus-visible,
.hh-form .btn:active:focus-visible {
  outline: 3px solid var(--hh-focus);
  outline-offset: 2px;
}

.hh-form .btn-primary,
.hh-form .btn-primary[disabled]:hover {
  color: var(--hh-on-brand);
  background-color: var(--hh-brand);
  border-color: var(--hh-brand);
}

.hh-form .btn-primary:hover,
.hh-form .btn-primary:focus,
.hh-form .btn-primary:active,
.hh-form .btn-primary:active:hover,
.hh-form .btn-primary:active:focus {
  color: var(--hh-on-brand);
  background-color: var(--hh-brand-dark);
  border-color: var(--hh-brand-dark);
}

.hh-form .btn-default,
.hh-form .btn-default[disabled]:hover {
  color: var(--hh-text);
  background-color: #ffffff;
  border-color: var(--hh-border-input);
}

.hh-form .btn-default:hover,
.hh-form .btn-default:focus,
.hh-form .btn-default:active,
.hh-form .btn-default:active:hover,
.hh-form .btn-default:active:focus {
  color: var(--hh-text);
  background-color: var(--hh-surface);
  border-color: var(--hh-brand);
}

.hh-form .btn-link {
  padding-left: 8px;
  padding-right: 8px;
  font-weight: 400;
  color: var(--hh-link);
  text-decoration: underline;
}

.hh-form .btn[disabled],
.hh-form .btn.disabled,
.hh-form fieldset[disabled] .btn {
  opacity: 0.55;
  cursor: not-allowed;
}

.hh-form .hh-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--hh-border);
}

.hh-form .hh-actions .help-block {
  flex: 1 1 240px;
  margin: 0;
}


/* 9. VALIDATION & ALERTS ----------------------------------------------- */

.hh-form .has-error .control-label,
.hh-form .has-error > label,
.hh-form .has-error .help-block.hh-error-text {
  color: var(--hh-danger);
}

.hh-form .has-error .help-block {
  color: var(--hh-text-muted);
}

.hh-form .hh-error-text {
  font-weight: 600;
  color: var(--hh-danger);
}

.hh-form .has-error .form-control,
.hh-form .has-error input[type="file"] {
  border-color: var(--hh-danger);
  box-shadow: inset 0 0 0 1px var(--hh-danger);
}

.hh-form .has-error .form-control:focus {
  border-color: var(--hh-danger);
  box-shadow: inset 0 0 0 1px var(--hh-danger), 0 0 0 3px rgba(180, 35, 24, 0.25);
}

.hh-form .has-error .checkbox label,
.hh-form .has-error .radio label,
.hh-form .has-error .checkbox-inline,
.hh-form .has-error .radio-inline {
  color: var(--hh-text);
}

.hh-form .has-success .form-control {
  border-color: var(--hh-success);
  box-shadow: none;
}

.hh-form .has-success .control-label,
.hh-form .has-success > label {
  color: var(--hh-text);
}

.hh-form .has-warning .form-control {
  border-color: var(--hh-warning);
  box-shadow: none;
}

.hh-form .has-warning .control-label,
.hh-form .has-warning > label {
  color: var(--hh-text);
}

.hh-form .alert {
  margin: 0 0 20px;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--hh-text);
  background: var(--hh-surface);
  border: 1px solid var(--hh-border);
  border-left-width: 4px;
  border-radius: var(--hh-radius);
}

.hh-form .alert-danger {
  background: var(--hh-danger-bg);
  border-color: var(--hh-danger);
}

.hh-form .alert-success {
  background: var(--hh-success-bg);
  border-color: var(--hh-success);
}

.hh-form .alert-warning {
  background: var(--hh-warning-bg);
  border-color: var(--hh-warning);
}

.hh-form .alert-info {
  border-color: var(--hh-focus);
}

.hh-form .hh-error-summary {
  margin-top: 20px;
  font-weight: 600;
}

.hh-form .hh-error-summary:focus {
  outline: 3px solid var(--hh-focus);
  outline-offset: 2px;
}

.hh-form [hidden] {
  display: none !important;
}


/* 10. NOTES, SIGNATURE PAD, FOOTER ----------------------------------------- */

.hh-form .hh-note {
  margin: 0 0 18px;
  padding: 12px 16px;
  font-size: 15px;
  background: var(--hh-surface);
  border-left: 4px solid var(--hh-brand);
  border-radius: var(--hh-radius);
}

.hh-form .hh-note--warning {
  background: var(--hh-warning-bg);
  border-left-color: var(--hh-warning);
}

.hh-form .hh-note > :last-child {
  margin-bottom: 0;
}

/* Holds LuxSci's signature pad. The pad itself comes from the form builder;
   this box only gives it the house size and the field outline. */
.hh-form .hh-signature-pad {
  position: relative;
  width: 380px;
  max-width: 100%;
  min-height: 130px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--hh-border-input);
  border-radius: var(--hh-radius);
}

.hh-form .hh-signature-pad canvas {
  display: block;
  max-width: 100%;
}

.hh-form .hh-signature-pad:focus-within {
  border-color: var(--hh-focus);
  box-shadow: 0 0 0 3px var(--hh-focus-ring);
}

.hh-form .has-error .hh-signature-pad {
  border-color: var(--hh-danger);
  box-shadow: inset 0 0 0 1px var(--hh-danger);
}

/* Shown only until the real pad is dropped in. */
.hh-form .hh-signature-placeholder {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 14px;
  color: var(--hh-text-muted);
  text-align: center;
  pointer-events: none;
}

.hh-form .hh-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  margin-top: 32px;
  font-size: 13px;
  color: var(--hh-text-muted);
}


/* 11. SMALL SCREENS ---------------------------------------------------- */

@media (max-width: 599px) {
  .hh-form {
    padding: 16px 16px 24px;
  }

  .hh-form.hh-form--card {
    margin-top: 0;
    margin-bottom: 0;
    padding: 16px 16px 24px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hh-form .hh-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hh-form .hh-logo {
    width: 190px;
  }

  .hh-form .hh-header-contact {
    text-align: left;
  }

  .hh-form .hh-title {
    padding: 12px 14px;
    font-size: 20px;
    text-align: left;
  }

  .hh-form .hh-check-group {
    flex-direction: column;
    gap: 10px;
  }

  .hh-form .hh-signature-pad {
    width: 100%;
  }

  .hh-form .hh-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hh-form .form-control,
  .hh-form .btn {
    transition: none;
  }
}


/* 12. PRINT ------------------------------------------------------------
   A printed copy reads like the paper form: ruled lines, no buttons. */

@media print {
  .hh-form,
  .hh-form.hh-form--card {
    max-width: none;
    margin: 0;
    padding: 0;
    font-size: 11pt;
    border: 0;
    box-shadow: none;
  }

  .hh-form .hh-actions,
  .hh-form .hh-error-summary,
  .hh-form .hh-required-note,
  .hh-form .hh-no-print {
    display: none !important;
  }

  .hh-form .hh-section {
    margin-top: 16pt;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .hh-form .form-control {
    height: auto;
    min-height: 0;
    padding: 2pt 0;
    font-size: 11pt;
    border: 0;
    border-bottom: 1px solid #000000;
    border-radius: 0;
    box-shadow: none;
  }

  .hh-form textarea.form-control {
    min-height: 54pt;
  }

  .hh-form .hh-title {
    border-color: #000000;
  }

  /* Bootstrap prints the URL after every link; not wanted on a form. */
  .hh-form a[href]::after {
    content: none;
  }
}
