/*
 * Blocks added to the sales component library (inc/templates/sales-blocks.php):
 * comparison tables, section subheadings, numbered step cards and location
 * cards. Same tokens and shapes as sales.css: 20px cards with an orange top
 * rule, teal headers, surface backgrounds on white sections.
 */

/* Subheadings inside a section body ---------------------------------------- */
.sales-section .sales-section__body > .sales-subhead {
  color: var(--ew-color-primary);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.25;
  margin: 64px 0 20px;
  max-width: 820px;
}
.sales-section .sales-section__body > .sales-subhead:first-child {
  margin-top: 0;
}
.sales-section .sales-section__body > .sales-subhead + p {
  margin-top: 0;
}
.sales-section .sales-section__body > p + .sales-list,
.sales-section .sales-section__body > p + .sales-steps,
.sales-section .sales-section__body > p + .sales-chips {
  margin-top: 24px;
}
.sales-section .sales-section__body > .sales-list + p,
.sales-section .sales-section__body > .sales-steps + p,
.sales-section .sales-section__body > .sales-table + p {
  margin-top: 28px;
}
@media (max-width: 1440px) {
  .sales-section .sales-section__body > .sales-subhead {
    font-size: calc(0.6vw + 21.4px);
  }
}
@media (max-width: 767px) {
  .sales-section .sales-section__body > .sales-subhead {
    margin-top: 44px;
  }
}

/* A lone figure line (a statistic with its source) ------------------------- */
.sales-section .sales-section__body > .sales-figure {
  border-left: 4px solid var(--ew-color-accent);
  color: var(--ew-color-primary);
  font-size: 22px;
  font-weight: 300;
  line-height: 1.45;
  max-width: 900px;
  padding: 4px 0 4px 28px;
}
@media (max-width: 767px) {
  .sales-section .sales-section__body > .sales-figure {
    font-size: 19px;
    padding-left: 20px;
  }
}

/* Comparison table ---------------------------------------------------------- */
.sales-table {
  background: #fff;
  border: 1px solid var(--ew-color-border);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 58, 75, 0.06);
  margin: 28px 0 0;
  overflow: hidden;
}
.sales-section--white .sales-table {
  border-color: var(--ew-color-border);
}
.sales-table:first-child {
  margin-top: 0;
}
.sales-table table {
  border-collapse: collapse;
  color: var(--ew-color-text);
  font-size: 16px;
  line-height: 24px;
  margin: 0;
  width: 100%;
}
.sales-table th,
.sales-table td {
  padding: 18px 22px;
  text-align: left;
  vertical-align: top;
}
.sales-table thead th {
  background: var(--ew-color-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  vertical-align: bottom;
}
.sales-table thead th.is-current {
  background: var(--ew-orange-text, #c2410c);
}
.sales-table tbody th,
.sales-table tbody td {
  border-top: 1px solid var(--ew-color-border);
}
.sales-table tbody tr:first-child th,
.sales-table tbody tr:first-child td {
  border-top: 0;
}
.sales-table tbody th {
  background: var(--ew-color-surface);
  color: var(--ew-color-primary);
  font-weight: 700;
  width: 22%;
}
.sales-table tbody td.is-current {
  background: #fff7f3;
}
.sales-table td a,
.sales-table th a {
  color: var(--ew-color-primary);
  font-weight: 700;
}
.sales-table td a:hover,
.sales-table th a:hover {
  color: var(--ew-orange-text-hover, #9a3412);
}
.sales-table .ew-cite a {
  font-weight: 700;
}
@media (max-width: 991px) {
  .sales-table th,
  .sales-table td {
    padding: 16px 16px;
  }
}
/* Phones: one card per row, each value under its column name. */
@media (max-width: 767px) {
  .sales-table {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  .sales-table table,
  .sales-table tbody,
  .sales-table tr,
  .sales-table th,
  .sales-table td {
    display: block;
    width: 100%;
  }
  .sales-table thead {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
  .sales-table tbody tr {
    background: #fff;
    border: 1px solid var(--ew-color-border);
    border-radius: 16px;
    border-top: 4px solid var(--ew-color-accent);
    margin-top: 14px;
    padding: 6px 18px 10px;
  }
  .sales-section--white .sales-table tbody tr {
    background: var(--ew-color-surface);
    border-color: var(--ew-color-surface);
    border-top-color: var(--ew-color-accent);
  }
  .sales-table tbody tr:first-child {
    margin-top: 0;
  }
  .sales-table tbody th,
  .sales-table tbody td,
  .sales-table tbody tr:first-child th,
  .sales-table tbody tr:first-child td {
    background: transparent;
    border-top: 1px solid var(--ew-color-border);
    padding: 12px 0;
    width: 100%;
  }
  .sales-table tbody th,
  .sales-table tbody tr:first-child th {
    border-top: 0;
    font-size: 18px;
    line-height: 24px;
    padding-top: 12px;
  }
  .sales-table tbody td.is-current {
    background: transparent;
  }
  .sales-table tbody td[data-label]::before {
    color: var(--ew-label-muted, #5e777f);
    content: attr(data-label);
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 18px;
    margin-bottom: 4px;
  }
  .sales-table tbody td.is-current[data-label]::before {
    color: var(--ew-orange-text, #c2410c);
  }
}

/* Numbered step cards ------------------------------------------------------- */
.sales-section--steps .sales-cards {
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  max-width: 980px;
  position: relative;
}
.sales-section--steps .sales-cards::before {
  background: linear-gradient(var(--ew-color-accent), rgba(240, 91, 38, 0.15));
  bottom: 40px;
  content: "";
  left: 59px;
  position: absolute;
  top: 40px;
  width: 2px;
}
.sales-section--steps .sales-card {
  border-top-width: 1px;
  padding: 40px 40px 40px 120px;
  position: relative;
}
.sales-section--steps .sales-card__title {
  font-size: 28px;
  margin-bottom: 18px;
}
.sales-step-num {
  align-items: center;
  background: var(--ew-orange-text, #c2410c);
  border: 6px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--ew-color-border);
  box-sizing: content-box;
  color: #fff;
  display: flex;
  font-size: 20px;
  font-weight: 700;
  height: 50px;
  justify-content: center;
  left: 28px;
  letter-spacing: 0;
  line-height: 1;
  position: absolute;
  top: 34px;
  width: 50px;
}
.sales-section--white .sales-section--steps .sales-step-num,
.sales-section--white.sales-section--steps .sales-step-num {
  border-color: #fff;
}
@media (max-width: 1440px) {
  .sales-section--steps .sales-card__title {
    font-size: calc(0.45vw + 21.5px);
  }
}
@media (max-width: 767px) {
  .sales-section--steps .sales-cards::before {
    display: none;
  }
  .sales-section--steps .sales-card {
    padding: 92px 22px 30px;
  }
  .sales-step-num {
    left: 22px;
    top: 22px;
  }
}

/* Location cards ------------------------------------------------------------ */
.sales-locs {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sales-section__body + .sales-locs {
  margin-top: 36px;
}
.sales-loc {
  background: #fff;
  border: 1px solid var(--ew-color-border);
  border-radius: 20px;
  border-top: 4px solid var(--ew-color-accent);
  box-shadow: 0 10px 30px rgba(0, 58, 75, 0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 34px 34px;
}
.sales-section--white .sales-loc {
  background: var(--ew-color-surface);
  border-color: var(--ew-color-surface);
  border-top-color: var(--ew-color-accent);
  box-shadow: none;
}
.sales-loc__state {
  align-items: center;
  color: var(--ew-color-text);
  display: flex;
  font-size: 22px;
  gap: 10px;
  line-height: 1.3;
  margin: 0;
}
.sales-loc__state strong {
  font-weight: 400;
}
.sales-loc__state::before {
  background-color: var(--ew-color-accent);
  content: "";
  flex: 0 0 18px;
  height: 22px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 22'%3E%3Cpath d='M9 0a9 9 0 0 0-9 9c0 6.6 9 13 9 13s9-6.4 9-13a9 9 0 0 0-9-9zm0 12.2A3.2 3.2 0 1 1 9 5.8a3.2 3.2 0 0 1 0 6.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 22'%3E%3Cpath d='M9 0a9 9 0 0 0-9 9c0 6.6 9 13 9 13s9-6.4 9-13a9 9 0 0 0-9-9zm0 12.2A3.2 3.2 0 1 1 9 5.8a3.2 3.2 0 0 1 0 6.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  width: 18px;
}
.sales-loc__program {
  align-items: center;
  align-self: flex-start;
  color: var(--ew-color-primary);
  display: inline-flex;
  font-size: 17px;
  font-weight: 700;
  gap: 10px;
  line-height: 24px;
}
.sales-loc__program::after {
  background-color: var(--ew-color-accent);
  content: "";
  flex: 0 0 20px;
  height: 14px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 14'%3E%3Cpath d='M13 0l-1.4 1.4L16.2 6H0v2h16.2l-4.6 4.6L13 14l7-7z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 14'%3E%3Cpath d='M13 0l-1.4 1.4L16.2 6H0v2h16.2l-4.6 4.6L13 14l7-7z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s ease-in-out;
  width: 20px;
}
.sales-loc__program:hover {
  color: var(--ew-orange-text-hover, #9a3412);
}
.sales-loc__program:hover::after {
  transform: translateX(4px);
}
.sales-loc__list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}
.sales-loc__item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--ew-color-border);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: space-between;
  margin: 0;
  padding: 14px 18px;
}
.sales-loc__name {
  color: var(--ew-color-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
}
a.sales-loc__name:hover {
  color: var(--ew-orange-text-hover, #9a3412);
}
.sales-loc__tel {
  align-items: center;
  color: var(--ew-color-primary);
  display: inline-flex;
  font-size: 16px;
  font-weight: 700;
  gap: 8px;
  line-height: 24px;
  white-space: nowrap;
}
.sales-loc__tel::before,
.sales-loc__text a[href^="tel:"]::before {
  background-color: currentColor;
  content: "";
  flex: 0 0 15px;
  height: 15px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
  width: 15px;
}
.sales-loc__text a[href^="tel:"]::before {
  display: inline-block;
  margin-right: 6px;
  vertical-align: -1px;
}
.sales-loc__tel:hover {
  color: var(--ew-orange-text-hover, #9a3412);
}
.sales-loc__text {
  font-size: 16px;
  line-height: 26px;
}
.sales-loc__text p {
  margin: 0;
}
.sales-loc__text a {
  color: var(--ew-color-primary);
  font-weight: 700;
  white-space: nowrap;
}
.sales-loc__text a:hover {
  color: var(--ew-orange-text-hover, #9a3412);
}
@media (max-width: 767px) {
  .sales-locs {
    grid-template-columns: minmax(0, 1fr);
  }
  .sales-loc {
    padding: 26px 20px 26px;
  }
  .sales-loc__state {
    font-size: 20px;
  }
}

/* Links in the programs hero's teal panel ---------------------------------- */
.hero-accent-block--sales .hero-accent-block__wrap a:not(.btn) {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero-accent-block--sales .hero-accent-block__wrap a:not(.btn):hover {
  color: #ffd9cb;
}
