.cda-medigap-quoter__intro {
  margin-bottom: 24px;
}

/* Mobile: hide blue contact bar on quoter and carrier rate pages — phone/email remain in footer */
@media (max-width: 767px) {
  body.cda-medigap-quoter-page .cda-topbar,
  body.cda-general-page:has(#cda-carrier-quoter-form) .cda-topbar {
    display: none !important;
  }
}

.cda-medigap-quoter__intro p {
  margin-bottom: 12px;
}

.cda-medigap-quoter-form {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

@media (min-width: 768px) {
  .cda-medigap-quoter-form__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.cda-medigap-quoter-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.cda-medigap-quoter-form .form-control {
  width: 100%;
}

.cda-medigap-quoter-form__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
}

.cda-medigap-quoter-form__checks label {
  font-weight: 400;
  margin: 0;
}

.cda-medigap-quoter-form__note {
  font-size: 12pt;
  line-height: 1.6;
  color: var(--cda-text, #1a1a1a);
}

.cda-medigap-quoter__results-wrap {
  display: grid;
  gap: 16px;
}

.cda-medigap-quoter__results-toolbar {
  margin: 0;
}

.cda-medigap-quoter__results-toolbar p {
  margin: 0;
  font-size: 12pt;
  line-height: 1.5;
  color: var(--cda-text, #1a1a1a);
}

.cda-medigap-quoter__results {
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) {
  .cda-medigap-quoter__results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .cda-medigap-quoter__results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cda-medigap-quote-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--cda-border, #d8dee8);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.cda-medigap-quote-card--selected {
  outline: 2px solid var(--cda-primary);
  outline-offset: 2px;
}

.cda-medigap-quote-card .cda-medigap-quote-card__plan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--cda-primary);
  color: #fff;
}

.cda-medigap-quote-card .cda-medigap-quote-card__plan-bar h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

/* Carrier pages inside legacy Bootstrap layout override heading colors */
.cda-legacy-content .container-fluid.section .cda-medigap-quote-card .cda-medigap-quote-card__plan-bar h3,
.cda-legacy-content .section .cda-medigap-quote-card .cda-medigap-quote-card__plan-bar h3,
.cda-card.cda-medigap-quote-card .cda-medigap-quote-card__plan-bar h3 {
  color: #fff;
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: left;
}

.cda-medigap-quote-card .cda-medigap-quote-card__plan-bar .cda-medigap-quote-card__plan-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.cda-medigap-quote-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.cda-medigap-quote-card .cda-medigap-quote-card__carrier-label {
  margin: 0 0 4px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cda-text-muted, #5a6472);
}

.cda-medigap-quote-card .cda-medigap-quote-card__carrier-brand {
  margin: 0;
  line-height: 0;
}

.cda-medigap-quote-card__carrier {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--cda-primary);
  line-height: 1.35;
}

.cda-medigap-quote-card__logo {
  display: block;
  max-width: 180px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left top;
}

.cda-medigap-quote-card .cda-medigap-quote-card__price-block {
  margin-top: 9px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cda-border, #d8dee8);
}

.cda-medigap-quote-card__price {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--cda-primary);
  line-height: 1.1;
}

.cda-medigap-quote-card__price span {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--cda-text);
}

.cda-medigap-quote-card__price-label {
  margin: 8px 0 0;
  font-size: 1.0625rem;
  color: var(--cda-text-muted, #5a6472);
}

.cda-medigap-quote-card__meta {
  margin: 14px 0 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--cda-text-muted, #5a6472);
}

.cda-medigap-quote-card__summary {
  margin: 16px 0 0;
  padding: 0;
}

.cda-medigap-quote-card__summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--cda-border, #d8dee8);
}

.cda-medigap-quote-card__summary-row dt {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--cda-text, #1a1a1a);
}

.cda-medigap-quote-card__summary-row dd {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: right;
  color: var(--cda-text, #1a1a1a);
}

.cda-medigap-quote-card__highlights {
  margin-top: 18px;
}

.cda-medigap-quote-card__highlights-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cda-text-muted, #5a6472);
}

.cda-medigap-quote-card__highlights ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cda-medigap-quote-card__highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 1.0625rem;
  line-height: 1.45;
}

.cda-medigap-quote-card__highlights img {
  flex-shrink: 0;
}

.cda-medigap-quote-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.cda-medigap-quote-card__footer .cda-btn {
  flex: 1 1 140px;
  font-size: 1rem;
}

.cda-medigap-quote-card__footer .cda-btn--apply-online {
  background: #449d44;
  border-color: #398439;
  color: #fff !important;
}

.cda-medigap-quote-card__footer .cda-btn--apply-online:hover,
.cda-medigap-quote-card__footer .cda-btn--apply-online:focus {
  background: #398439;
  border-color: #2d672d;
  color: #fff !important;
}

.cda-medigap-quote-card__footer .cda-btn--download-app {
  background: #337ab7;
  border-color: #2e6da4;
  color: #fff !important;
}

.cda-medigap-quote-card__footer .cda-btn--download-app:hover,
.cda-medigap-quote-card__footer .cda-btn--download-app:focus {
  background: #286090;
  border-color: #204d74;
  color: #fff !important;
}

.cda-medigap-quote-card__compare-btn--selected {
  background: var(--cda-primary);
  border-color: var(--cda-primary);
  color: #fff;
}

.cda-medigap-quote-card__compare-input.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cda-medigap-quoter__empty {
  padding: 20px;
}

.cda-medigap-quoter__demo-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cda-bg-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.cda-medigap-compare-hint {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(0, 86, 150, 0.08);
  color: var(--cda-text);
}

.cda-medigap-compare-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  width: 100%;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--cda-border, #d8dee8);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
}

/* Sticky bar: fixed left/right spans viewport — avoid 100vw breakout (causes horizontal clip on mobile) */
.cda-carrier-rate-quoter .cda-medigap-compare-sticky {
  width: auto;
  margin-left: 0;
  margin-right: 0;
}

.cda-medigap-compare-sticky__inner {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: none;
}

.cda-medigap-compare-sticky__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  max-width: 420px;
}

.cda-medigap-compare-sticky__status {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
}

.cda-medigap-compare-sticky .cda-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.cda-medigap-compare-sticky--ready {
  border-top-color: var(--cda-primary);
}

.cda-medigap-compare-sticky--ready .cda-medigap-compare-sticky__status {
  font-weight: 700;
  color: var(--cda-primary);
}

@media (max-width: 575px) {
  .cda-medigap-compare-sticky__center {
    width: 100%;
    max-width: none;
  }

  .cda-medigap-compare-sticky .cda-btn {
    width: 100%;
  }
}

body.cda-medigap-compare-sticky-open .cda-page-main {
  padding-bottom: 88px;
}

/* Carrier pages: sticky clearance on results only — not page-main (avoids white strip above footer) */
body.cda-general-page:has(#cda-carrier-quoter-form).cda-medigap-compare-sticky-open .cda-page-main {
  padding-bottom: 0 !important;
}

body.cda-general-page:has(#cda-carrier-quoter-form).cda-medigap-compare-sticky-open #cda-carrier-quoter-quotes-section {
  padding-bottom: 88px;
}

.cda-medigap-compare-view-wrap {
  margin-top: 32px;
  padding-top: 24px;
  padding-bottom: 48px;
  border-top: 2px solid var(--cda-primary);
}

#cda-medigap-compare-view {
  margin-top: 0;
  margin-bottom: 32px;
}

.cda-medigap-compare-view h2 {
  color: var(--cda-primary);
  margin-bottom: 8px;
}

.cda-medigap-compare-view__toolbar {
  margin-bottom: 16px;
}

.cda-medigap-compare-table__logo {
  display: block;
  max-width: 120px;
  max-height: 36px;
  width: auto;
  height: auto;
  margin: 0 auto 8px;
  object-fit: contain;
  object-position: center top;
}

.cda-medigap-compare-column__logo {
  display: block;
  max-width: 140px;
  max-height: 42px;
  width: auto;
  height: auto;
  margin-bottom: 8px;
  object-fit: contain;
  object-position: left top;
}

.cda-medigap-compare-table__carrier {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.cda-medigap-compare-table__plan {
  display: block;
  font-size: 0.95rem;
}

.cda-medigap-compare-table__price {
  display: block;
  font-size: 0.9rem;
  color: var(--cda-text-muted, #5a6472);
  white-space: normal;
}

.cda-medigap-compare-view__desktop {
  display: none;
}

.cda-medigap-compare-view__mobile {
  display: grid;
  gap: 16px;
}

@media (min-width: 768px) {
  .cda-medigap-compare-view__desktop {
    display: block;
  }

  .cda-medigap-compare-view__mobile {
    display: none;
  }
}


.cda-medigap-compare-column__header h3 {
  margin: 0 0 4px;
  color: var(--cda-primary);
  font-size: 1.15rem;
}

.cda-medigap-compare-column__plan {
  margin: 0;
  font-weight: 700;
}

.cda-medigap-compare-column__price {
  margin: 8px 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cda-primary);
}

.cda-medigap-compare-column__price span {
  font-size: 0.95rem;
  font-weight: 400;
}

.cda-medigap-benefit-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.cda-medigap-benefit-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cda-border, #d8dee8);
}

.cda-medigap-benefit__name {
  flex: 1;
  font-size: 1rem;
  line-height: 1.5;
}

.cda-medigap-benefit__value {
  flex-shrink: 0;
  min-width: 48px;
  text-align: right;
}

.cda-medigap-benefit__value--none {
  color: var(--cda-text-muted, #5a6472);
}

.cda-medigap-quoter-compare {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--cda-border, #d8dee8);
}

.cda-medigap-quoter-compare h2 {
  margin-bottom: 8px;
  color: var(--cda-primary);
}

.cda-medigap-quoter-compare__intro {
  margin-bottom: 16px;
  font-size: 12pt;
  line-height: 1.6;
  color: var(--cda-text, #1a1a1a);
}

.cda-medigap-quoter-compare__footnotes {
  margin-top: 28px;
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--cda-text, #1a1a1a);
}

.cda-medigap-quoter-compare__footnotes ul {
  margin: 0;
  padding-left: 1.35rem;
  font-size: 17px;
}

.cda-medigap-quoter-compare__footnotes li {
  margin-bottom: 16px;
  font-size: 17px;
  line-height: 1.7;
}

.cda-medigap-quoter-compare__footnotes li:last-child {
  margin-bottom: 0;
}

.cda-medigap-compare-table th,
.cda-medigap-compare-table td {
  vertical-align: top;
}

.cda-medigap-compare-table thead th {
  text-align: center;
  white-space: normal;
  min-width: 120px;
  vertical-align: bottom;
}

.cda-medigap-compare-table tbody th[scope="row"] {
  min-width: 220px;
  font-weight: 400;
  text-align: left;
}

.cda-medigap-compare-table tbody td {
  text-align: center;
}

.cda-medigap-compare-table tbody tr {
  background-color: #fff;
}

.cda-medigap-compare-table tbody th[scope="row"],
.cda-medigap-compare-table tbody td {
  background-color: #fff;
}

.cda-medigap-benefit__value img {
  width: 24px;
  height: auto;
}

/* Embedded carrier-page rate quoter */
.cda-carrier-rate-quoter__intro {
  margin: 0 0 16px;
  max-width: 52rem;
}

.cda-carrier-rate-quoter__form {
  margin-bottom: 24px;
}

.cda-carrier-rate-quoter .cda-medigap-quoter__results {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 768px) {
  .cda-carrier-rate-quoter .cda-medigap-quoter__results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .cda-carrier-rate-quoter .cda-medigap-quoter__results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cda-carrier-rate-quoter .cda-medigap-quote-card__footer {
  flex-wrap: wrap;
  gap: 8px;
}

.cda-carrier-rate-quoter .cda-medigap-quote-card__footer .cda-btn--secondary {
  flex: 1 1 auto;
  min-width: 140px;
}

/* Keep gray disclaimer flush to footer on carrier quoter pages */
body.cda-general-page:has(#cda-carrier-quoter-form) .cda-page-main > .cda-section,
body.cda-general-page:has(#cda-carrier-quoter-form) .cda-page-main > .cda-section > .cda-container,
body.cda-general-page:has(#cda-carrier-quoter-form) .cda-legacy-content,
body.cda-general-page:has(#cda-carrier-quoter-form) .cda-legacy-content > .container-fluid.section:not(.sectionColorGray) {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.cda-carrier-rate-quoter__footnote {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--cda-text, #1a1a1a);
  max-width: 52rem;
  scroll-margin-bottom: 100px;
}

/* Carrier quoter: reorder intro → form → footnote → cards (footnote after cards on desktop) */
.cda-carrier-rate-quoter {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.cda-carrier-rate-quoter__intro {
  order: 0;
}

#cda-carrier-quoter-form {
  order: 1;
}

#cda-carrier-quoter-quotes-section {
  order: 2;
}

#cda-carrier-quoter-compare-view {
  order: 3;
}

.cda-carrier-rate-quoter__footnote {
  order: 4;
  margin-top: 16px;
}

@media (max-width: 767px) {
  .cda-carrier-rate-quoter__footnote {
    order: 2;
    margin: 0 0 16px;
    padding: 12px 10px;
    font-size: 15px;
    line-height: 1.55;
    background: rgba(0, 86, 150, 0.07);
    border-left: 3px solid var(--cda-primary, #005696);
    border-radius: 0 8px 8px 0;
  }

  #cda-carrier-quoter-quotes-section {
    order: 3;
  }

  #cda-carrier-quoter-compare-view {
    order: 4;
  }

  /* Tight side gutters; full-width cards without horizontal clip */
  body.cda-general-page:has(#cda-carrier-quoter-form) .cda-page-main > .cda-section > .cda-container {
    padding-left: 5px;
    padding-right: 5px;
  }

  body.cda-general-page:has(#cda-carrier-quoter-form) .cda-legacy-content .container-fluid.section:not(.sectionColorGray) {
    padding-left: 0;
    padding-right: 0;
  }

  body.cda-general-page:has(#cda-carrier-quoter-form) .cda-legacy-content .container-fluid.section .row {
    margin-left: 0;
    margin-right: 0;
  }

  body.cda-general-page:has(#cda-carrier-quoter-form) .cda-carrier-rate-quoter,
  body.cda-general-page:has(#cda-carrier-quoter-form) .cda-medigap-quoter__results-wrap,
  body.cda-general-page:has(#cda-carrier-quoter-form) .cda-medigap-quoter__results,
  body.cda-general-page:has(#cda-carrier-quoter-form) .cda-medigap-quote-card {
    max-width: 100%;
    min-width: 0;
  }

  body.cda-general-page:has(#cda-carrier-quoter-form) .cda-medigap-quote-card__body,
  body.cda-general-page:has(#cda-carrier-quoter-form) .cda-medigap-quote-card__summary-row {
    overflow-wrap: anywhere;
  }

  body.cda-general-page:has(#cda-carrier-quoter-form) .cda-carrier-rate-quoter .cda-medigap-quote-card__footer .cda-btn--secondary {
    min-width: 0;
  }
}

#cda-carrier-quoter-compare-view {
  margin-top: 0;
  margin-bottom: 32px;
}
