/* Dive Guide match strip: under search, above Search Everywhere.
 * All breakpoints. Not a third search-mode tab. */

.dg-match {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  max-width: var(--ds-home-well, 1100px);
  width: min(var(--ds-home-well, 1100px), calc(100% - 2 * var(--ds-home-pad, 24px)));
  margin: var(--ds-home-gap, 28px) auto 0;
  padding: 18px 20px;
  box-sizing: border-box;
  background: #fff;
  border: 1.5px solid rgba(66, 245, 230, 0.65);
  border-left: 5px solid #42f5e6;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(6, 47, 58, 0.08);
}

.dg-match-mark {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #e7fff9;
  border: 1px solid #8fe9df;
  display: grid;
  place-items: center;
  color: #0d3d6b;
}

.dg-match-copy {
  flex: 1 1 280px;
  min-width: 0;
}

.dg-match-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #0f9f9b;
}

.dg-match-title {
  margin: 0 0 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #0d3d6b;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.dg-match-sub {
  margin: 0;
  font-size: 14px;
  color: #43566b;
  line-height: 1.4;
}

.dg-match-actions {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dg-match-chip {
  border: 1.5px solid #d5dee8;
  background: #fff;
  color: #0d3d6b;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.dg-match-chip:hover {
  border-color: #8fe9df;
}

.dg-match-cta {
  margin-left: auto;
  background: #0d3d6b;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}

.dg-match-cta:hover {
  background: #0a3157;
}

/* Sheet + scrim: closed by default */
.dg-match-scrim,
.dg-match-sheet {
  display: none;
}

body.dg-match-open .dg-match-scrim {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 22, 36, 0.45);
}

body.dg-match-open .dg-match-sheet {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 14px 16px 22px;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25);
  max-width: 520px;
  margin: 0 auto;
  box-sizing: border-box;
}

.dg-match-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: #d5dee8;
  margin: 0 auto 14px;
}

.dg-match-sheet-title {
  margin: 0 0 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0d3d6b;
}

.dg-match-sheet-sub {
  margin: 0 0 14px;
  font-size: 13px;
  color: #43566b;
}

.dg-match-sheet-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dg-match-sheet-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid #d5dee8;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  text-align: left;
  font: inherit;
  font-weight: 700;
  color: #0d3d6b;
  cursor: pointer;
  width: 100%;
}

.dg-match-sheet-opt:hover {
  border-color: #8fe9df;
  background: #e7fff9;
}

.dg-match-sheet-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e7fff9;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #0d3d6b;
  font-size: 16px;
}

.dg-match-sheet-lab {
  display: block;
  min-width: 0;
}

.dg-match-sheet-lab span {
  display: block;
  font-weight: 500;
  color: #5b6f82;
  margin-top: 2px;
  font-size: 12.5px;
}

/* Tablet / phone: stack CTA full width */
@media (max-width: 1024px) {
  .dg-match {
    padding: 16px;
    gap: 12px;
  }
  .dg-match-title {
    font-size: 18px;
  }
  .dg-match-cta {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .dg-match {
    width: calc(100% - 32px);
    margin-top: 18px;
  }
  .dg-match-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}

/* Compact phone landscape */
@media (max-height: 500px) and (orientation: landscape) {
  .dg-match {
    padding: 10px 14px;
  }
  .dg-match-mark {
    display: none;
  }
  .dg-match-sub {
    display: none;
  }
  .dg-match-title {
    font-size: 15px;
  }
  .dg-match-chip {
    padding: 6px 10px;
    font-size: 12px;
  }
  .dg-match-cta {
    padding: 8px 12px;
    font-size: 12px;
    width: auto;
    margin-left: auto;
  }
  .dg-match-actions {
    flex: 1 1 auto;
  }
}

/* Everywhere no longer hosts the rec chip: drop reserved bottom padding.
   Hide any leftover glued bar. Tighten match → Everywhere. */
.ds-everywhere > .dg-advice,
.ds-everywhere > section.dg-advice {
  display: none;
}
.ds-everywhere:has(> .dg-advice) .ds-everywhere-in,
.ds-everywhere .ds-everywhere-in {
  padding-bottom: 24px;
}
.dg-match + .ds-everywhere,
.dg-match + .ds-everywhere.ds-everywhere {
  margin-top: 12px;
}
