/* ----------------------------------------------------------------------------
   Send Money Comparison — additional styles layered on top of styles.css
   ---------------------------------------------------------------------------- */

/* ---------- Calculator ---------- */
.sm-calc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  margin: 24px 0 28px;
  box-shadow: var(--shadow);
}

.sm-calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1fr;
  gap: 18px;
  align-items: end;
}

.sm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sm-field-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.sm-amount-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px 6px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sm-amount-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 123, 94, 0.12);
}

.sm-amount-prefix {
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-muted);
  margin-right: 8px;
  font-size: 1.05rem;
}

.sm-amount-wrap input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  padding: 8px 0;
  width: 100%;
  color: var(--text);
}

.sm-field select {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%235c6370' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sm-field select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 123, 94, 0.12);
}

.sm-field-summary {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.sm-mid-rate {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.sm-mid-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sm-trust-bar {
  margin: 18px 0 0;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text);
}

.sm-trust-bar strong {
  color: var(--accent-dark);
}

.sm-updated {
  display: inline-block;
  margin-left: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .sm-calc-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .sm-calc {
    padding: 16px;
  }
  .sm-mid-rate {
    font-size: 1.15rem;
  }
}

/* ---------- Comparison table ---------- */
.sm-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
}

.sm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  min-width: 820px;
}

.sm-table th,
.sm-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.sm-table th:first-child,
.sm-table td:first-child {
  padding-left: 14px;
}

.sm-table th:last-child,
.sm-table td:last-child {
  padding-right: 14px;
}

.sm-table thead th {
  background: var(--surface);
  text-align: right;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 1;
}

.sm-col-rank, .sm-col-provider {
  text-align: left !important;
}

.sm-table td.sm-col-rank,
.sm-table td.sm-col-provider {
  text-align: left;
}

.sm-table tbody td {
  text-align: right;
}

.sm-table tbody tr:last-child td {
  border-bottom: 0;
}

.sm-col-rank {
  width: 36px;
  font-family: var(--mono);
  color: var(--text-muted);
  font-weight: 600;
}

.sm-col-result {
  background: rgba(0, 123, 94, 0.04);
}

.sm-table tbody tr.is-best {
  background: rgba(0, 123, 94, 0.06);
}

.sm-table tbody tr.is-best td.sm-col-result {
  background: rgba(0, 123, 94, 0.12);
  font-weight: 700;
}

.sm-table tbody tr.is-stale {
  opacity: 0.72;
}

.sm-provider-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.sm-provider-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.sm-provider-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sm-provider-name a {
  font-weight: 600;
  color: var(--text);
}

.sm-provider-name a:hover {
  color: var(--accent-dark);
}

.sm-provider-tag {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.sm-best-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  vertical-align: 1px;
}

.sm-stale-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #b6831f;
  background: #fff7e0;
  border: 1px solid #f0d99a;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.sm-margin-pos {
  color: var(--down);
  font-weight: 600;
}

.sm-margin-zero {
  color: var(--accent-dark);
  font-weight: 700;
}

.sm-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}

.sm-cta-btn:hover {
  background: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

.sm-cta-btn.is-secondary {
  background: var(--surface);
  color: var(--accent-dark);
  border: 1px solid var(--border);
}

.sm-cta-btn.is-secondary:hover {
  background: var(--accent-soft);
}

.sm-cta-btn--compact {
  padding: 7px 12px;
  font-size: 0.82rem;
  gap: 4px;
}

.sm-action-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.sm-table .sm-col-action {
  width: 1%;
  padding-left: 10px;
  padding-right: 14px;
}

.sm-affiliate-tag {
  font-size: 0.66rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sm-empty {
  text-align: center !important;
  color: var(--text-muted);
  padding: 30px 14px !important;
  font-style: italic;
}

.sm-table-foot {
  margin: 10px 0 30px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .sm-table {
    min-width: 0;
    width: 100%;
  }
  .sm-col-num,
  .sm-col-speed {
    display: none;
  }
  .sm-col-result {
    display: table-cell;
  }
  .sm-table th,
  .sm-table td {
    padding: 12px 10px;
  }
  .sm-provider-tag {
    display: none;
  }
}

/* ---------- Hidden fee explainer ---------- */
.sm-explainer {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0;
  margin: 0 0 32px;
  overflow: hidden;
}

.sm-explainer summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  color: var(--text);
}

.sm-explainer summary::-webkit-details-marker {
  display: none;
}

.sm-explainer-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--accent-dark);
  transition: transform 0.2s ease;
}

.sm-explainer[open] .sm-explainer-icon {
  transform: rotate(45deg);
}

.sm-explainer-body {
  padding: 0 18px 18px;
  color: var(--text);
}

.sm-explainer-body p {
  margin: 0 0 12px;
}

.sm-worked-example {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 14px 0;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.7;
}

.sm-worked-example strong {
  color: var(--accent-dark);
}

/* ---------- Tracker chart ---------- */
.sm-tracker {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg);
  box-shadow: var(--shadow);
  margin-bottom: 36px;
}

.sm-tracker-wrap {
  position: relative;
  height: clamp(260px, 38vh, 380px);
  margin-bottom: 12px;
}

.sm-tracker-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sm-tracker-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sm-tracker-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* ---------- Featured comparison cards ---------- */
.sm-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 0 0 36px;
}

.sm-feature-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  color: var(--text);
}

.sm-feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-1px);
}

.sm-feature-corridor {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.sm-feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 6px 0 10px;
  letter-spacing: -0.01em;
}

.sm-feature-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.sm-feature-meta strong {
  color: var(--text);
}

.sm-feature-cta {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--accent-dark);
  font-weight: 600;
}

/* ---------- Provider grid ---------- */
.sm-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 0 0 40px;
}

.sm-provider-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sm-provider-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.sm-provider-card .sm-provider-logo {
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
}

.sm-provider-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.sm-provider-card-name {
  font-weight: 700;
  font-size: 1rem;
}

.sm-provider-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- Provider profile pages ---------- */
.sm-profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 24px 0 8px;
  flex-wrap: wrap;
}

.sm-profile-hero .sm-provider-logo {
  width: 64px;
  height: 64px;
  font-size: 1.6rem;
  border-radius: 12px;
}

.sm-profile-hero h1 {
  margin: 0;
}

.sm-profile-tagline {
  color: var(--text-muted);
  margin: 4px 0 0;
  font-size: 1rem;
}

.sm-profile-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 18px 0 28px;
}

.sm-profile-meta .stat-label {
  margin-bottom: 4px;
}

.sm-profile-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 28px;
  flex-wrap: wrap;
}

.sm-profile-cta .sm-cta-btn {
  font-size: 0.95rem;
  padding: 11px 20px;
}

.sm-disclosure {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sm-rating {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.sm-rating .stars {
  color: #f5b400;
  letter-spacing: 1px;
  font-size: 1.05rem;
  margin-right: 6px;
}

.sm-proscons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 0 0 28px;
}

.sm-proscons .col {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg);
}

.sm-proscons h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.sm-proscons .col.pros {
  border-left: 3px solid var(--up);
}

.sm-proscons .col.cons {
  border-left: 3px solid var(--down);
}

.sm-proscons ul {
  margin: 0;
  padding: 0 0 0 18px;
}

.sm-proscons li {
  margin: 4px 0;
}

.sm-faq {
  margin: 0 0 32px;
}

.sm-faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 8px;
  background: var(--bg);
}

.sm-faq summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.sm-faq summary::-webkit-details-marker {
  display: none;
}

.sm-faq summary::after {
  content: "+";
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 1.2rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

.sm-faq details[open] summary::after {
  transform: rotate(45deg);
}

.sm-faq-body {
  padding: 0 16px 16px;
  color: var(--text);
}

/* ---------- Comparison page (vs) ---------- */
.sm-vs-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 24px 0 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}

.sm-vs-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sm-vs-side .sm-provider-logo {
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
}

.sm-vs-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.sm-vs-divider {
  font-weight: 800;
  color: var(--text-muted);
  font-size: 1.4rem;
  font-family: var(--mono);
}

.sm-vs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.sm-vs-table th,
.sm-vs-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.sm-vs-table thead th {
  background: var(--surface);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.sm-vs-table tbody td:first-child,
.sm-vs-table thead th:first-child {
  text-align: left;
  font-weight: 600;
}

.sm-vs-table tr.winner-a td.col-a,
.sm-vs-table tr.winner-b td.col-b {
  background: rgba(0, 123, 94, 0.08);
  color: var(--accent-dark);
  font-weight: 700;
}

.sm-vs-verdict {
  background: var(--accent-soft);
  border: 1px solid #b9dccd;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 30px;
}

.sm-vs-verdict h3 {
  margin: 0 0 8px;
  color: var(--accent-dark);
}

.sm-vs-verdict p {
  margin: 0;
}

@media (max-width: 600px) {
  .sm-vs-hero {
    grid-template-columns: 1fr;
  }
  .sm-vs-divider {
    transform: rotate(90deg);
  }
}

/* ---------- Live rate widget on profile pages ---------- */
.sm-live-rates {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 0 0 28px;
}

.sm-live-rates table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.sm-live-rates th,
.sm-live-rates td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.sm-live-rates th:first-child,
.sm-live-rates td:first-child {
  text-align: left;
  font-weight: 600;
}

.sm-live-rates thead th {
  background: var(--surface);
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.sm-live-rates tr:last-child td {
  border-bottom: 0;
}

.sm-live-rates .rank-best {
  color: var(--accent-dark);
  font-weight: 700;
}

.sm-section-intro {
  color: var(--text-muted);
  margin: 0 0 14px;
  font-size: 0.95rem;
}
