/**
 * AutoOne Unified Credit Application — styling.
 *
 * These rules are copied verbatim from the dealer portal rebuild's real
 * stylesheet (for reference/assets/css/dealer-portal.css), trimmed to only
 * the selectors this page actually uses (no dashboard/login/table/
 * tab-sidebar/valuation-card/lease-calculator/superadmin rules, none of
 * which apply here). Class names and values are kept identical to that
 * source so this page matches the dealer portal's look exactly — do not
 * invent new class names or values here; port them from the source file
 * instead if something is missing.
 *
 * The wrapper markup in page-templates/credit-application-page.php reuses
 * the same `.cw-portal` / `#cw-submission-page` structure the source uses,
 * so id-scoped rules below (e.g. `#cw-submission-page .cw-panel`) apply
 * without modification.
 */

/**
 * NOTE: the narrow-column look reported earlier turned out to be a PHP
 * fatal error rendering WordPress's own crash page (styled with its own
 * `body{max-width:700px}`), not an actual CSS constraint from the theme —
 * see autoone_creditapp_province_options() in
 * autoone-custom/gravity/autoone-gravity-form-creditapp-unified.php. This
 * rule is left in as a harmless safety net in case a real width
 * constraint still shows up once the page renders cleanly; remove it if
 * #cw-submission-page renders full width on its own.
 */
#cw-submission-page {
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

:root {
  --cw-red: #D0021B;
  --cw-red-dark: #a00015;
  --cw-black: #111111;
  --cw-white: #ffffff;
  --cw-gray-mid: #E5E5E5;
  --cw-gray-light: #F5F4F2;
  --cw-gray-text: #888888;
  --cw-gray-soft: #f9f9f9;
  --cw-border-soft: #f0f0f0;
  --cw-green: #22c55e;
  --cw-orange: #f59e0b;
  --cw-overlay: rgba(17, 17, 17, 0.72);
  --cw-font: 'DM Sans', sans-serif;
  --cw-radius: 12px;
  --cw-radius-sm: 8px;
  --cw-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.cw-portal {
  font-family: var(--cw-font);
  background: var(--cw-gray-soft);
  color: var(--cw-black);
}

.cw-portal *,
.cw-portal *::before,
.cw-portal *::after {
  box-sizing: border-box;
}

.cw-portal a {
  color: inherit;
}

.cw-portal svg {
  display: block;
}

.cw-page-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
  display: grid;
  gap: 1.5rem;
}

#cw-submission-page .cw-page-wrap {
  max-width: none;
}

.cw-app-title-row,
.cw-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

#cw-submission-page .cw-step-head {
  margin-bottom: 0.95rem;
}

.cw-app-title-row {
  margin-bottom: 0.25rem;
}

.cw-app-title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.cw-app-sub {
  color: var(--cw-gray-text);
  font-size: 13px;
  margin: 0 0 1.5rem;
}

.cw-step-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cw-step-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--cw-gray-mid);
}

.cw-step-dot.active {
  background: var(--cw-red);
}

/**
 * Step image — reuses the theme's existing form-01/02/03-porsche images
 * (assets/images/), the same ones the original 3-page Gravity Forms
 * "GETTING IN THE CAR / ADJUSTING THE SEAT / PUTTING IT IN GEAR" step bar
 * used (see src/scss/_forms.scss, .gf_page_steps). One image is shown at a
 * time and swapped by JS as the step changes (src set from data-step-1/
 * data-step-2/data-step-3/data-step-3-active on the <img> itself, theme
 * asset URLs resolved server-side since this plugin-side stylesheet can't
 * reach them).
 */
.cw-app-panel {
  max-width: 1100px;
  margin: 0 auto;
}

.cw-step-image {
  text-align: center;
  padding: 1.75rem 1.5rem 0;
}

.cw-step-image img {
  display: block;
  width: auto;
  height: 90px;
  max-width: 100%;
  margin: 0 auto;
  transition: none !important;
  animation: none !important;
}

.cw-step-image .cw-app-title {
  margin-top: 0.85rem;
}

.cw-step-panel {
  display: none;
}

.cw-step-panel.active {
  display: block;
}

.cw-step-content-pad {
  padding: 1.5rem;
}

/**
 * Persistent back/forward nav, positioned beside the panel rather than
 * below it. Only one pair for the whole 3-step flow — back is hidden on
 * step 1, forward is disabled until the current step's required fields
 * are filled (kept in sync live by credit-application.js), and on the
 * last step forward triggers submit instead of advancing.
 */
.cw-step-stage {
  position: relative;
  padding: 0 100px;
}

.cw-step-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--cw-gray-mid);
  border-radius: 50%;
  background: var(--cw-white);
  color: var(--cw-black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--cw-shadow);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.cw-step-nav-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cw-step-nav-back {
  left: 0;
}

.cw-step-nav-forward {
  right: 0;
  border-color: var(--cw-red);
  background: var(--cw-red);
  color: var(--cw-white);
}

.cw-step-nav-btn:not(:disabled):hover {
  border-color: var(--cw-red);
  color: var(--cw-red);
}

.cw-step-nav-forward:not(:disabled):hover {
  background: var(--cw-red-dark);
  border-color: var(--cw-red-dark);
  color: var(--cw-white);
}

.cw-step-nav-forward:disabled {
  background: var(--cw-gray-mid);
  border-color: var(--cw-gray-mid);
  color: #ffffff;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .cw-step-stage {
    padding: 0 60px;
  }

  .cw-step-nav-btn {
    width: 38px;
    height: 38px;
  }
}

.cw-sub-grid {
  display: grid;
  align-items: stretch;
  gap: 1.75rem;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
  margin-bottom: 1.25rem;
}

.cw-sub-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
  min-width: 0;
}

#cw-submission-page .cw-sub-column > .cw-panel {
  flex: 1 1 auto;
}

.cw-panel {
  background: var(--cw-white);
  border: 1px solid var(--cw-gray-mid);
  border-radius: 12px;
  overflow: hidden;
}

#cw-submission-page .cw-panel {
  width: 100%;
}

#cw-submission-page .cw-app-panel {
  overflow: visible;
}

.cw-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0;
}

.cw-step-panel[data-step="1"] .cw-card-head {
  padding-bottom: 0.95rem;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.cw-vehicle-card-head {
  padding-bottom: 0.65rem;
}

.cw-card-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--cw-gray-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cw-card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cw-vehicle-card-head .cw-card-actions {
  gap: 0.45rem;
}

.cw-card-actions .cw-ghost-btn {
  min-height: 2rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
}

.cw-client-card-inner,
.cw-vehicle-card-inner {
  display: flex;
  flex: 1 1 auto;
  gap: 12px;
  margin: 0 1.5rem 1.5rem;
  position: relative;
}

.cw-step-panel[data-step="2"] .cw-profile-fields {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.cw-profile-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 48px;
  padding-right: 12px;
  border-right: 1px solid var(--cw-gray-mid);
  flex-shrink: 0;
}

.cw-profile-fields {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.cw-profile-fields > .cw-toggle-row {
  margin: 0 0 0.9rem;
}

.cw-profile-fields > .cw-form-grid,
.cw-profile-fields > .cw-commercial-fields {
  margin: 0;
}

.cw-profile-fields > .cw-commercial-fields {
  margin-top: 1rem;
}

.cw-applicant-chip {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--cw-gray-mid);
  border-radius: 50%;
  background: var(--cw-gray-light);
  color: var(--cw-gray-text);
  cursor: pointer;
  position: relative;
  padding: 0;
}

.cw-applicant-chip.active {
  border-color: var(--cw-red);
  background: #fff5f5;
  color: var(--cw-red);
}

.cw-applicant-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cw-applicant-chip svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cw-applicant-chip-badge {
  position: absolute;
  right: -4px;
  bottom: -2px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border: 1px solid var(--cw-white);
  border-radius: 999px;
  background: var(--cw-black);
  color: var(--cw-white);
  font-size: 9px;
  font-weight: 600;
  line-height: 13px;
  text-align: center;
}

.cw-applicant-chip.active .cw-applicant-chip-badge {
  background: var(--cw-red);
}

.cw-dash-title-row,
.cw-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cw-applicant-type-row {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cw-toggle-pills,
.cw-radio-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cw-applicant-type-row .cw-toggle-pills {
  flex: 1;
}

.cw-pill-btn {
  min-height: 2rem;
  padding: 6px 14px;
  border: 1px solid var(--cw-gray-mid);
  border-radius: 20px;
  background: var(--cw-white);
  color: var(--cw-gray-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.cw-pill-btn.active {
  background: var(--cw-red);
  border-color: var(--cw-red);
  color: var(--cw-white);
}

.cw-inline-trash-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--cw-gray-mid);
  border-radius: 8px;
  background: var(--cw-white);
  color: var(--cw-gray-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.cw-inline-trash-btn:hover {
  border-color: var(--cw-red);
  color: var(--cw-red);
  background: #fff5f5;
}

.cw-inline-trash-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cw-panel > .cw-form-grid,
.cw-panel > .cw-field,
.cw-panel > .cw-radio-row,
.cw-panel > .cw-commercial-fields,
.cw-panel > .cw-inline-status {
  margin: 1rem 1.5rem 0;
}

.cw-form-grid {
  display: grid;
  gap: 0.9rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/**
 * Applicant panel (step 1): identity/address fields on the left, everything
 * else (employment, income, home ownership / business & financial detail)
 * on the right — grouped by meaning rather than just alternating grid
 * cells, and each column is single-field-wide so cw-field-full is no
 * longer needed within it.
 */
.cw-form-split {
  display: grid;
  gap: 0 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.cw-form-col {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cw-vehicle-pane .cw-form-grid {
  gap: 0.8rem 1rem;
  margin: 0;
}

.cw-field {
  display: grid;
  gap: 4px;
}

.cw-field span {
  font-size: 11px;
  font-weight: 500;
  color: var(--cw-gray-text);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cw-required-label::after {
  content: ' *';
  color: #d32f2f;
}

.cw-field-full {
  grid-column: 1 / -1;
}

/**
 * Year/Make/Model CBB Vehicle Lookup Autocomplete dropdown — positioned
 * relative to the field label so it floats directly under the input
 * regardless of where that field sits in the surrounding grid.
 */
.cw-field-with-suggestions {
  position: relative;
}

.cw-suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: 4px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--cw-white);
  border: 1px solid var(--cw-gray-mid);
  border-radius: var(--cw-radius-sm);
  box-shadow: var(--cw-shadow);
}

.cw-suggestion-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--cw-border-soft);
  background: transparent;
  color: var(--cw-black);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.cw-suggestion-item:last-child {
  border-bottom: 0;
}

.cw-suggestion-item:hover,
.cw-suggestion-item.is-active {
  background: var(--cw-gray-light);
  color: var(--cw-red);
}

.cw-field input,
.cw-field select,
.cw-field textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  box-sizing: border-box;
  background: #fafafa;
  color: var(--cw-black);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.cw-field select {
  appearance: auto;
  -webkit-appearance: auto;
}

.cw-field input:focus,
.cw-field select:focus,
.cw-field textarea:focus {
  border-color: var(--cw-red);
  background: var(--cw-white);
}

.cw-field input::placeholder,
.cw-field textarea::placeholder {
  color: #bbbbbb;
}

.cw-field.is-missing input,
.cw-field.is-missing select,
.cw-field.is-missing textarea,
.cw-radio-row.is-missing {
  border-color: #d32f2f !important;
  background: #fff8f8;
}

.cw-radio-row.is-missing {
  padding: 10px 12px;
  border: 1px solid #d32f2f;
  border-radius: 12px;
}

.cw-dob-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cw-radio-row label {
  font-size: 13px;
}

.cw-radio-row input,
.cw-disclaimer-box input {
  accent-color: var(--cw-red);
}

.cw-circle-choice-row {
  gap: 10px;
}

.cw-circle-choice-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.cw-circle-choice-row input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1.5px solid #c9c9c9;
  border-radius: 50%;
  background: #fff;
  position: relative;
  flex-shrink: 0;
}

.cw-circle-choice-row input[type="radio"]:checked {
  border-color: var(--cw-red);
}

.cw-circle-choice-row input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cw-red);
  transform: translate(-50%, -50%);
}

.cw-vehicle-pane .cw-radio-row {
  margin-top: 0.95rem;
}

.cw-vehicle-pane .cw-radio-row:first-child {
  margin-top: 0;
}

.cw-inline-status {
  padding: 10px 12px;
  border: 1px solid var(--cw-gray-mid);
  border-radius: 8px;
  background: var(--cw-white);
  color: var(--cw-black);
  font-size: 13px;
}

.cw-inline-status.is-error {
  border-color: var(--cw-red);
  color: var(--cw-red);
}

.cw-inline-status.is-success {
  border-color: var(--cw-green);
  color: #166534;
}

.cw-disclaimer-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0.9rem; /* same gap as between the review summary cards */
  margin-bottom: 1.25rem;
}

/* Box and header come from .cw-selected-card / .cw-selected-card-head, so
   the consent card matches the Applicant and Vehicle cards above it. */
.cw-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 0.9rem;
  cursor: pointer;
}

.cw-consent-row input {
  flex-shrink: 0;
  margin: 2px 0 0; /* lines the box up with the first line of text */
}

#cw-submission-page .cw-consent-text,
#cw-submission-page .cw-consent-scope {
  margin: 0;
  color: var(--cw-gray-text);
  font-size: 11px;
  line-height: 1.5;
}

#cw-submission-page .cw-consent-scope {
  margin-top: 4px;
  padding-left: 23px; /* checkbox width + gap, so it aligns with the text above */
}

.cw-disclaimer-box a {
  color: var(--cw-red);
}

/* Replaces the forward arrow on the review step (the arrow is hidden there). */
.cw-submit-row {
  display: flex;
  justify-content: flex-end;
}

.cw-submit-row .cw-primary-btn {
  width: auto;
  padding: 10px 28px;
  font-size: 14px;
}

@media (max-width: 640px) {
  .cw-submit-row .cw-primary-btn {
    width: 100%;
  }
}

.cw-selected-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--cw-gray-mid);
  border-radius: 10px;
  background: var(--cw-white);
}

.cw-selected-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cw-selected-card-head strong {
  font-size: 11px;
  font-weight: 500;
  color: var(--cw-gray-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cw-selected-grid {
  display: grid;
  gap: 0.9rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.9rem;
}

.cw-selected-grid dt {
  color: var(--cw-gray-text);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cw-selected-grid dd {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 500;
}

.cw-primary-btn,
.cw-secondary-btn,
.cw-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--cw-font);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.cw-primary-btn {
  background: var(--cw-red);
  color: var(--cw-white);
}

.cw-primary-btn:hover {
  background: var(--cw-red-dark);
}

.cw-primary-btn:disabled {
  background: #cfcfcf;
  border-color: #cfcfcf;
  color: #ffffff;
  cursor: not-allowed;
}

.cw-secondary-btn,
.cw-ghost-btn {
  background: transparent;
  border-color: var(--cw-gray-mid);
  color: var(--cw-black);
}

.cw-secondary-btn:hover,
.cw-ghost-btn:hover {
  border-color: var(--cw-red);
  color: var(--cw-red);
}

.cw-step-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 0.25rem;
  flex-wrap: wrap;
}

.cw-step-actions .cw-primary-btn {
  width: auto;
  padding: 10px 28px;
  font-size: 14px;
}

.cw-step-actions .cw-secondary-btn {
  width: auto;
  font-size: 14px;
}

.cw-video-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--cw-overlay);
  z-index: 5000;
}

.cw-video-overlay.active {
  display: flex;
}

.cw-video-modal {
  position: relative;
  width: min(700px, 100%);
  background: var(--cw-white);
  border-radius: 12px;
  overflow: hidden;
}

#cwProcessingModalOverlay {
  padding: 2rem;
  background:
    radial-gradient(circle at top, rgba(208, 2, 27, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

#cwProcessingModalOverlay .cw-video-modal {
  width: min(1120px, calc(100vw - 64px));
  max-width: 1120px;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.cw-processing-modal {
  width: 100%;
  max-width: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

/* White card on the dark overlay — the text is dark, so it needs a light
   background to be readable. */
.cw-processing-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 32px 28px;
  text-align: center;
  background: var(--cw-white);
  border-radius: var(--cw-radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  font-family: var(--cw-font);
}

.cw-processing-modal-spinner {
  width: 52px;
  height: 52px;
  animation: cw-processing-rotate 1.1s linear infinite;
}

.cw-processing-modal-spinner circle {
  fill: none;
  stroke-width: 5;
}

.cw-processing-spinner-track {
  stroke: var(--cw-gray-mid);
}

.cw-processing-spinner-arc {
  stroke: var(--cw-red);
  stroke-linecap: round;
  /* ~30% of the 125.6 circumference visible */
  stroke-dasharray: 40 126;
}

@keyframes cw-processing-rotate {
  to {
    transform: rotate(360deg);
  }
}

.cw-processing-modal-body p {
  margin: 0;
  color: var(--cw-black);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.cw-processing-modal-body .cw-processing-note {
  color: var(--cw-gray-text);
  font-size: 14px;
  font-weight: 400;
}

@media (prefers-reduced-motion: reduce) {
  .cw-processing-modal-spinner {
    animation: none;
  }
}

@media (max-width: 1080px) {
  .cw-sub-grid,
  .cw-form-grid,
  .cw-form-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .cw-page-wrap {
    padding: 1rem;
  }


  .cw-app-title-row,
  .cw-selected-card-head,
  .cw-card-head,
  .cw-step-head,
  .cw-step-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .cw-dob-grid {
    grid-template-columns: 1fr;
  }

  .cw-client-card-inner {
    flex-direction: column;
    margin-right: 1rem;
    margin-left: 1rem;
  }

  .cw-profile-sidebar {
    flex-direction: row;
    justify-content: flex-start;
    min-width: 0;
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--cw-gray-mid);
  }
}

[hidden] {
  display: none !important;
}

/**
 * Fixed to the viewport (not the document), so it stays anchored to the
 * bottom-right corner as the page scrolls rather than scrolling away with
 * the content.
 */
.cw-guarantor-reminder {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(320px, calc(100vw - 32px));
  padding: 1.1rem 1.25rem;
  background: var(--cw-white);
  border: 1px solid var(--cw-red);
  border-radius: var(--cw-radius);
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.18);
}

.cw-guarantor-reminder p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cw-black);
}

.cw-guarantor-reminder .cw-primary-btn {
  width: auto;
  align-self: flex-start;
  padding: 8px 16px;
  font-size: 13px;
}

@media (max-width: 480px) {
  .cw-guarantor-reminder {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }
}
