/* Personal cost estimator modal — scoped to finder */

.sm-ma-estimator-modal {
  position: fixed;
  inset: 0;
  z-index: calc(var(--sm-z-modal, 1000) + 1);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.sm-ma-estimator-modal[hidden] {
  display: none !important;
}

.sm-ma-estimator-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(50, 28, 68, 0.55);
}

.sm-ma-estimator-modal__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--sm-linen, #faf8fc);
  border-radius: var(--sm-radius-lg, 14px);
  box-shadow: var(--sm-shadow-lg);
  margin: auto;
}

.sm-ma-estimator-modal__panel--wide {
  max-width: 820px;
}

.sm-ma-estimator-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sm-space-4);
  padding: var(--sm-space-6) var(--sm-space-6) 0;
}

.sm-ma-estimator-modal__head h2 {
  font-family: var(--sm-font-head);
  font-size: var(--sm-text-lg);
  font-weight: 800;
  color: var(--sm-purple);
  margin: 0 0 4px;
}

.sm-ma-estimator-modal__head p {
  font-size: var(--sm-text-sm);
  color: var(--sm-muted);
  margin: 0;
}

.sm-ma-estimator-modal__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--sm-border);
  border-radius: var(--sm-radius);
  background: var(--sm-white);
  color: var(--sm-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.sm-ma-estimator-modal__body {
  padding: var(--sm-space-4) var(--sm-space-6) var(--sm-space-6);
}

.sm-ma-estimator-modal__disc {
  font-size: var(--sm-text-xs);
  color: var(--sm-muted-lt);
  line-height: 1.5;
  margin-top: var(--sm-space-4);
  padding-top: var(--sm-space-4);
  border-top: 1px solid var(--sm-border);
}

/* Wizard card */
.sm-ma-est-card {
  background: var(--sm-white);
  border: 1.5px solid var(--sm-border);
  border-radius: var(--sm-radius-md);
  padding: var(--sm-space-6) var(--sm-space-5);
}

.sm-ma-est-tag {
  display: inline-flex;
  font-family: var(--sm-font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sm-purple);
  background: var(--sm-purple-lt);
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 14px;
}

.sm-ma-est-title {
  font-family: var(--sm-font-head);
  font-size: var(--sm-text-md);
  font-weight: 800;
  line-height: 1.3;
  color: var(--sm-purple);
  margin: 0 0 8px;
}

.sm-ma-est-lead {
  font-size: var(--sm-text-sm);
  color: var(--sm-muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

.sm-ma-est-hint {
  font-size: var(--sm-text-xs);
  color: var(--sm-muted-lt);
  margin: 6px 0 0;
}

.sm-ma-est-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--sm-space-6);
}

.sm-ma-est-btn-row .sm-btn-primary {
  margin-left: auto;
}

.sm-ma-estimator-standalone .sm-btn-primary:disabled,
.sm-ma-estimator-modal .sm-btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.sm-ma-est-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--sm-font-head);
  font-size: var(--sm-text-xs);
  font-weight: 600;
  color: var(--sm-purple);
  text-decoration: underline;
  cursor: pointer;
  margin-top: var(--sm-space-3);
}

.sm-ma-est-expand[hidden] {
  display: none !important;
}

/* Progress */
.sm-ma-est-progress {
  margin-bottom: var(--sm-space-4);
}

.sm-ma-est-progress__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--sm-font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sm-muted-lt);
  margin-bottom: 7px;
}

.sm-ma-est-track {
  height: 4px;
  background: var(--sm-border);
  border-radius: 999px;
  overflow: hidden;
}

.sm-ma-est-fill {
  height: 100%;
  background: linear-gradient(101deg, var(--sm-purple) 0%, var(--sm-orange) 100%);
  border-radius: 999px;
  transition: width 320ms ease;
}

/* Choices */
.sm-ma-est-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sm-ma-est-choice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--sm-border);
  border-radius: var(--sm-radius);
  background: var(--sm-white);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 140ms ease, background 140ms ease;
}

.sm-ma-est-choice:hover {
  border-color: var(--sm-purple);
}

.sm-ma-est-choice.is-selected {
  border-color: var(--sm-orange);
  background: var(--sm-orange-lt);
}

.sm-ma-est-choice__pip {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--sm-purple-lt);
  color: var(--sm-purple);
  font-family: var(--sm-font-head);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sm-ma-est-choice.is-selected .sm-ma-est-choice__pip {
  background: var(--sm-orange);
  color: var(--sm-white);
}

.sm-ma-est-choice__label {
  display: block;
  font-family: var(--sm-font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--sm-body);
  margin-bottom: 2px;
}

.sm-ma-est-choice__sub {
  display: block;
  font-size: 13px;
  color: var(--sm-muted);
  line-height: 1.45;
}

/* Plan list */
.sm-ma-est-plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.sm-ma-est-plan {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--sm-border);
  border-radius: var(--sm-radius);
  cursor: pointer;
  background: var(--sm-white);
}

.sm-ma-est-plan.is-selected {
  border-color: var(--sm-orange);
  background: var(--sm-orange-lt);
}

.sm-ma-est-plan input {
  margin-top: 3px;
  accent-color: var(--sm-orange);
}

.sm-ma-est-plan__name {
  display: block;
  font-family: var(--sm-font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--sm-purple);
}

.sm-ma-est-plan__meta {
  display: block;
  font-size: 13px;
  color: var(--sm-muted);
}

/* Usage steppers */
.sm-ma-est-usage {
  padding: var(--sm-space-4) 0;
  border-bottom: 1px solid var(--sm-border);
}

.sm-ma-est-usage:last-of-type {
  border-bottom: none;
}

.sm-ma-est-usage__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sm-ma-est-usage__title {
  font-family: var(--sm-font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--sm-purple);
}

.sm-ma-est-usage__help {
  font-size: 13px;
  color: var(--sm-muted-lt);
  text-align: right;
  max-width: 200px;
}

.sm-ma-est-seg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sm-ma-est-seg {
  min-width: 52px;
  padding: 10px 14px;
  border: 1.5px solid var(--sm-border);
  border-radius: var(--sm-radius);
  background: var(--sm-white);
  font-family: var(--sm-font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--sm-muted);
  cursor: pointer;
}

.sm-ma-est-seg.is-selected {
  border-color: var(--sm-orange);
  background: var(--sm-orange-lt);
  color: var(--sm-purple);
}

/* Outlook */
.sm-ma-est-outlook-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sm-ma-est-outlook {
  padding: 16px 12px;
  border: 1.5px solid var(--sm-border);
  border-radius: var(--sm-radius);
  background: var(--sm-white);
  text-align: center;
  cursor: pointer;
  font-family: inherit;
}

.sm-ma-est-outlook.is-selected {
  border-color: var(--sm-orange);
  background: var(--sm-orange-lt);
}

.sm-ma-est-outlook__icon {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

.sm-ma-est-outlook__label {
  display: block;
  font-family: var(--sm-font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--sm-purple);
}

.sm-ma-est-outlook__sub {
  display: block;
  font-size: 11px;
  color: var(--sm-muted);
  margin-top: 4px;
}

/* Results */
.sm-ma-est-result {
  text-align: center;
  padding: 8px 0 20px;
  border-bottom: 1px solid var(--sm-border);
  margin-bottom: 20px;
}

.sm-ma-est-result__eyebrow {
  font-family: var(--sm-font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sm-muted);
  margin: 0 0 6px;
}

.sm-ma-est-result__amount {
  font-family: var(--sm-font-head);
  font-size: 42px;
  font-weight: 800;
  color: var(--sm-purple);
  line-height: 1;
  margin: 0;
}

.sm-ma-est-result__amount span {
  font-size: 20px;
  font-weight: 600;
}

.sm-ma-est-result__monthly {
  font-size: var(--sm-text-sm);
  color: var(--sm-muted);
  margin: 6px 0 0;
}

.sm-ma-est-result__plan {
  font-family: var(--sm-font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--sm-purple);
  margin: 12px 0 0;
}

.sm-ma-est-result__meta {
  font-size: 13px;
  color: var(--sm-muted-lt);
  margin: 4px 0 0;
}

.sm-ma-est-delta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.sm-ma-est-delta__cell {
  padding: 14px;
  border-radius: var(--sm-radius);
  background: var(--sm-purple-lt);
  text-align: center;
}

.sm-ma-est-delta__cell.is-savings {
  background: #dcfce7;
}

.sm-ma-est-delta__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sm-muted);
  margin: 0 0 4px;
}

.sm-ma-est-delta__val {
  font-family: var(--sm-font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--sm-purple);
  margin: 0;
}

.sm-ma-est-delta__cell.is-savings .sm-ma-est-delta__val {
  color: var(--sm-success);
}

/* Breakdown */
.sm-ma-est-breakdown details {
  border: 1.5px solid var(--sm-border);
  border-radius: var(--sm-radius);
  overflow: hidden;
}

.sm-ma-est-breakdown summary {
  padding: 12px 14px;
  font-family: var(--sm-font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--sm-purple);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sm-ma-est-breakdown summary::-webkit-details-marker {
  display: none;
}

.sm-ma-est-breakdown summary::after {
  content: '+';
  font-size: 18px;
  color: var(--sm-muted);
}

.sm-ma-est-breakdown details[open] summary::after {
  content: '−';
}

.sm-ma-est-breakdown__body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--sm-border);
}

.sm-ma-est-breakdown__body--flush {
  padding: 0;
}

.sm-ma-est-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--sm-border);
}

.sm-ma-est-line.is-total {
  font-size: 15px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 2px solid var(--sm-border);
  border-bottom: none;
  font-weight: 800;
  color: var(--sm-purple);
}

.sm-ma-est-note {
  font-size: 12px;
  color: var(--sm-muted-lt);
  padding: 10px 12px;
  background: var(--sm-purple-lt);
  border-radius: var(--sm-radius);
  margin: 12px 14px 14px;
}

/* Side-by-side compare table */
.sm-ma-est-cmp-scroll {
  overflow-x: auto;
}

.sm-ma-est-cmp-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
}

.sm-ma-est-cmp-table thead th {
  padding: 12px 14px;
  text-align: left;
  vertical-align: bottom;
  background: var(--sm-purple-lt);
  border-bottom: 1.5px solid var(--sm-border);
  font-weight: 400;
}

.sm-ma-est-cmp-head {
  display: block;
  font-family: var(--sm-font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sm-muted);
  margin-bottom: 4px;
}

.sm-ma-est-cmp-plan {
  display: block;
  font-family: var(--sm-font-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--sm-purple);
  line-height: 1.35;
}

.sm-ma-est-cmp-table tbody th,
.sm-ma-est-cmp-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--sm-border);
  vertical-align: top;
}

.sm-ma-est-cmp-table tbody th {
  text-align: left;
  font-weight: 400;
}

.sm-ma-est-cmp__label {
  display: block;
  font-family: var(--sm-font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--sm-body);
}

.sm-ma-est-cmp__sub {
  display: block;
  font-size: 11px;
  color: var(--sm-muted-lt);
  margin-top: 2px;
}

.sm-ma-est-cmp-table td {
  font-family: var(--sm-font-head);
  font-weight: 700;
  white-space: nowrap;
}

.sm-ma-est-cmp-table td.is-target {
  color: var(--sm-purple);
}

.sm-ma-est-diff {
  display: inline-block;
  font-family: var(--sm-font-head);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.sm-ma-est-diff--same {
  color: var(--sm-muted-lt);
  background: var(--sm-linen);
}

.sm-ma-est-diff--save {
  color: var(--sm-success);
  background: #dcfce7;
}

.sm-ma-est-diff--more {
  color: #b45309;
  background: #fef3c7;
}

.sm-ma-est-cmp-total th,
.sm-ma-est-cmp-total td {
  border-top: 2px solid var(--sm-border);
  border-bottom: none;
  padding-top: 14px;
  font-size: 15px;
  color: var(--sm-purple);
}

/* Plan card CTA */
.sm-ma-card__actions .sm-ma-estimate {
  width: 100%;
}

/* Standalone cost estimator page */
.sm-ma-estimator-standalone {
  max-width: 560px;
  margin-inline: auto;
  font-family: var(--sm-font-body);
}

.sm-ma-estimator-standalone--wide {
  max-width: 960px;
}

.sm-ma-estimator-standalone__launch {
  text-align: center;
  padding: var(--sm-space-8) var(--sm-space-4);
  background: var(--sm-white);
  border: 1.5px solid var(--sm-border);
  border-radius: var(--sm-radius-md);
}

.sm-ma-estimator-standalone__lede {
  color: var(--sm-muted);
  margin: 0 0 var(--sm-space-6);
  line-height: 1.65;
}

.sm-ma-estimator-standalone__zip-hint {
  font-family: var(--sm-font-head);
  font-size: var(--sm-text-sm);
  font-weight: 600;
  color: var(--sm-purple);
  margin: 0 0 var(--sm-space-4);
}

.sm-ma-estimator-standalone__head {
  margin-bottom: var(--sm-space-4);
}

.sm-ma-estimator-standalone__title {
  font-family: var(--sm-font-head);
  font-size: var(--sm-text-lg);
  font-weight: 800;
  color: var(--sm-purple);
  margin: 0 0 4px;
}

.sm-ma-estimator-standalone__sub {
  font-size: var(--sm-text-sm);
  color: var(--sm-muted);
  margin: 0;
}

.sm-ma-est-card--flush {
  padding-bottom: var(--sm-space-4);
}

.sm-ma-est-plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sm-space-4);
  margin-top: var(--sm-space-5);
}

@media (min-width: 640px) {
  .sm-ma-est-plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sm-ma-est-plan-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sm-space-2);
  width: 100%;
  text-align: left;
  background: var(--sm-white);
  border: 1.5px solid var(--sm-border);
  border-radius: var(--sm-radius-md);
  padding: var(--sm-space-5);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color var(--sm-transition), box-shadow var(--sm-transition), transform var(--sm-transition);
  font-family: inherit;
}

.sm-ma-est-plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sm-orange);
  opacity: 0;
  transition: opacity var(--sm-transition);
}

.sm-ma-est-plan-card:hover,
.sm-ma-est-plan-card:focus-visible {
  border-color: var(--sm-accent);
  box-shadow: var(--sm-shadow-md);
  outline: none;
}

.sm-ma-est-plan-card:hover::before,
.sm-ma-est-plan-card:focus-visible::before {
  opacity: 1;
}

.sm-ma-est-plan-card__rank {
  display: inline-flex;
  font-family: var(--sm-font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sm-green, #1a7f4b);
  background: rgba(26, 127, 75, 0.1);
  padding: 4px 8px;
  border-radius: 999px;
}

.sm-ma-est-plan-card__carrier {
  font-family: var(--sm-font-head);
  font-size: var(--sm-text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-muted);
}

.sm-ma-est-plan-card__name {
  font-family: var(--sm-font-head);
  font-size: var(--sm-text-md);
  font-weight: 700;
  color: var(--sm-purple);
  line-height: 1.3;
}

.sm-ma-est-plan-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sm-space-3);
  width: 100%;
  margin-top: var(--sm-space-2);
}

.sm-ma-est-plan-card__metrics span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sm-ma-est-plan-card__metrics strong {
  font-family: var(--sm-font-head);
  font-size: var(--sm-text-base);
  font-weight: 800;
  color: var(--sm-purple);
  letter-spacing: -0.02em;
}

.sm-ma-est-plan-card__metrics small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sm-muted);
}

.sm-ma-est-plan-card__delta {
  font-family: var(--sm-font-head);
  font-size: var(--sm-text-xs);
  font-weight: 700;
  color: var(--sm-muted);
}

.sm-ma-est-plan-card__delta--save {
  color: var(--sm-green, #1a7f4b);
}

.sm-ma-est-plan-card__delta--more {
  color: var(--sm-orange);
}

.sm-ma-est-plan-card__cta {
  margin-top: auto;
  padding-top: var(--sm-space-2);
  font-family: var(--sm-font-head);
  font-size: var(--sm-text-xs);
  font-weight: 700;
  color: var(--sm-purple);
}

.sm-ma-est-plan-card.is-highlighted {
  border-color: var(--sm-purple);
  box-shadow: var(--sm-shadow-md);
}

.sm-ma-est-plan-card.is-highlighted::before {
  opacity: 1;
}

.sm-ma-est-plan-card__rank--you {
  color: var(--sm-purple);
  background: rgba(80, 45, 120, 0.1);
}

.sm-ma-est-compare-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sm-space-3);
  padding: var(--sm-space-4);
  margin: var(--sm-space-4) 0;
  background: var(--sm-purple-lt, #f3eef8);
  border-radius: var(--sm-radius);
}

.sm-ma-est-compare-bar p {
  margin: 0;
  font-size: var(--sm-text-sm);
  color: var(--sm-purple);
}

.sm-ma-est-compare-bar--cta {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.sm-ma-est-compare-bar--cta .sm-btn {
  width: 100%;
}

@media (max-width: 640px) {
  .sm-ma-est-outlook-row {
    grid-template-columns: 1fr;
  }

  .sm-ma-est-usage__head {
    flex-direction: column;
  }

  .sm-ma-est-usage__help {
    text-align: left;
    max-width: none;
  }

  .sm-ma-est-btn-row .sm-btn-primary {
    margin-left: 0;
    width: 100%;
  }

  .sm-ma-est-delta {
    grid-template-columns: 1fr;
  }

  .sm-ma-estimator-modal {
    padding: 0;
  }

  .sm-ma-estimator-modal__panel {
    min-height: 100vh;
    border-radius: 0;
  }
}
