/* Galápagos tool embeds — featured-guide card (single border, no foam outer) */

.tt-tool-embed {
  --wc-deep: #062a5c;
  --wc-primary: #083A80;
  --wc-sea: #0d6a9a;
  --wc-foam: #e8f4fa;
  --wc-ink: #0b0a12;
  --wc-muted: #5e5e5f;
  --wc-ocean: #2c5a61;
  --wc-ocean-mid: #316a72;
  --wc-ocean-deep: #1f4147;
  --wc-island: #c7b389;
  --wc-island-coast: #6e5e3e;
  --wc-island-route: #d4c49a;
  --wc-pin-ink: #1c3a3d;
  --wc-pin-cream: #f2ede4;
  --wc-map-ratio: 1172 / 882;
  --gi-route: #b08d57;
  --gi-route-ink: #f2ede4;
  margin: 1.75rem 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--wc-ink);
}

/* Map flush to card edge (like featured-guide image) */
.tt-tool-embed .tt-tool-embed__card .tt-tool-embed__map {
  border-radius: 0;
  box-shadow: none;
  height: 100%;
  min-height: 220px;
}

.tt-tool-embed .tt-tool-embed__card .wc-map-panel,
.tt-tool-embed .tt-tool-embed__card .wc-map-canvas {
  max-height: none;
  height: 100%;
  min-height: 220px;
  aspect-ratio: auto;
}

.tt-tool-embed__lede {
  margin: 0 0 0.55rem;
  color: var(--wc-primary);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
}

.tt-tool-embed__example {
  margin: 0 0 1rem;
  color: #555;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.55;
}

.tt-tool-embed__sep {
  margin: 0 0.35em;
  color: var(--wc-primary);
  opacity: 0.55;
}

.tt-tool-embed__layout {
  margin: 0;
}

.tt-tool-embed__eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--wc-sea);
}

.tt-tool-embed__title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
  font-weight: 700;
}

.tt-tool-embed__title a {
  color: inherit;
  text-decoration: none;
}

.tt-tool-embed__title a:hover {
  color: var(--wc-deep);
  text-decoration: underline;
}

/* Match tour-bubble / ship luxury badge — hug text, don’t stretch in flex columns */
.tt-tool-embed__badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 0.35rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.18rem 0.38rem;
  border-radius: 3px;
  white-space: nowrap;
  color: var(--wc-primary);
  background: transparent;
  border: 1px solid var(--wc-primary);
}

.tt-tool-embed__map {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0.65rem;
  background: var(--wc-ocean);
  box-shadow: none;
}

.tt-tool-embed .wc-map-panel,
.tt-tool-embed .wc-map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: var(--wc-map-ratio);
  max-height: 220px;
  background: var(--wc-ocean);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (min-width: 768px) {
  .tt-tool-embed .wc-map-panel,
  .tt-tool-embed .wc-map-canvas {
    max-height: 240px;
  }

  .tt-tool-embed--itinerary .wc-map-panel,
  .tt-tool-embed--itinerary .wc-map-canvas {
    max-height: 210px;
  }
}

@media (max-width: 767.98px) {
  .tt-tool-embed .wc-map-panel,
  .tt-tool-embed .wc-map-canvas {
    max-height: 190px;
  }
}

.tt-tool-embed .wc-map-pan {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  color: var(--wc-island);
}

.tt-tool-embed .wc-basemap-wrap,
.tt-tool-embed .wc-basemap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tt-tool-embed .wc-basemap {
  display: block;
}

/* Hide EQ chip / labels inside embeds — they fight the example-route badge */
.tt-tool-embed .wc-basemap__equator,
.tt-tool-embed .wc-basemap__labels,
.tt-tool-embed .wc-map-labels {
  display: none !important;
}

.tt-tool-embed .wc-dive-sites {
  opacity: 1;
}

/* Force sand islands with warm basalt coastline */
.tt-tool-embed .wc-island,
.tt-tool-embed .wc-dive-sites .wc-island {
  color: var(--wc-island) !important;
  fill: var(--wc-island) !important;
  stroke: var(--wc-island-coast, #6e5e3e) !important;
  stroke-width: 1.5 !important;
  stroke-linejoin: round;
  paint-order: fill stroke;
  opacity: 1 !important;
  filter: none !important;
}

.tt-tool-embed .wc-island.is-on-route,
.tt-tool-embed .wc-island.is-lit,
.tt-tool-embed .wc-island.is-active {
  color: var(--wc-island-route) !important;
  fill: var(--wc-island-route) !important;
  stroke: var(--wc-island-coast, #6e5e3e) !important;
  stroke-width: 1.75 !important;
  stroke-linejoin: round;
  paint-order: fill stroke;
  opacity: 1 !important;
  filter: none !important;
}

.tt-tool-embed .wc-map-canvas.has-lit-island .wc-island:not(.is-lit):not(.is-active):not(.is-on-route) {
  opacity: 1 !important;
}

/* Wildlife month label on the map (same luxury outline style) */
.tt-tool-embed__map-badge {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  z-index: 5;
  display: inline-flex;
  padding: 0.22rem 0.4rem;
  border-radius: 0.3rem;
  border: 1px solid var(--wc-primary);
  background: rgba(255, 255, 255, 0.96);
  color: var(--wc-primary);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.tt-tool-embed .gi-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}

.tt-tool-embed .gi-route__line {
  stroke: var(--gi-route);
  stroke-width: 0.32;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1.6 1.35;
  opacity: 0.9;
  filter: drop-shadow(0 0 0.7px rgba(176, 141, 87, 0.4));
  transition: stroke-dashoffset 1.5s ease-out;
}

.tt-tool-embed .gi-route__line.is-cruise {
  animation: tt-gi-route-dash 4s linear infinite;
}

.tt-tool-embed .gi-route__dot {
  fill: var(--gi-route);
  stroke: var(--gi-route-ink);
  stroke-width: 0.16;
  opacity: 0.95;
}

.tt-tool-embed .gi-route__arrow,
.tt-tool-embed .gi-route__arrow-stem,
.tt-tool-embed .gi-route__arrow-head {
  display: none;
}

@keyframes tt-gi-route-dash {
  to {
    stroke-dashoffset: -12;
  }
}

.tt-tool-embed .wc-pins {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.tt-tool-embed--wildlife .wc-pins {
  pointer-events: auto;
}

.tt-tool-embed .wc-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  z-index: 1;
}

.tt-tool-embed .wc-pin.is-open {
  z-index: 6;
}

.tt-tool-embed .wc-pin__marker {
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  position: relative;
  z-index: 2;
}

.tt-tool-embed--wildlife .wc-pin.is-active .wc-pin__marker {
  cursor: pointer;
  pointer-events: auto;
}

.tt-tool-embed .wc-pin__teardrop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--wc-pin-cream, #f2ede4) !important;
  border: 1.5px solid var(--wc-pin-ink, #1c3a3d) !important;
  box-shadow: none !important;
  filter: none !important;
}

.tt-tool-embed .wc-pin__photo,
.tt-tool-embed .wc-pin__icon {
  transform: rotate(45deg);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  object-fit: cover;
  filter: none !important;
  color: var(--wc-pin-ink, #1c3a3d);
}

.tt-tool-embed .gi-pin.is-on-route .wc-pin__teardrop,
.tt-tool-embed .wc-pin.is-peak .wc-pin__teardrop,
.tt-tool-embed .wc-pin.is-likely .wc-pin__teardrop {
  border-color: var(--wc-pin-ink, #1c3a3d) !important;
  box-shadow: none !important;
}

.tt-tool-embed .wc-pin.is-peak::after {
  display: none !important;
}

.tt-tool-embed .wc-bubble {
  display: none !important;
}

.tt-tool-embed--wildlife .tt-tool-embed__map {
  overflow: visible;
}

.tt-tool-embed--wildlife .wc-map-panel,
.tt-tool-embed--wildlife .wc-map-canvas {
  overflow: visible;
}

.tt-tool-embed--wildlife .wc-bubble {
  display: none;
  position: absolute;
  left: 50%;
  /* Default: hang under the pin so the marker stays visible */
  top: calc(100% + 0.35rem);
  bottom: auto;
  z-index: 1;
  width: 10.75rem;
  max-width: min(10.75rem, 70vw);
  padding: 0.4rem 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(8, 58, 128, 0.18);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 18px rgba(6, 42, 92, 0.16);
  color: #1c3a3d;
  transform: translateX(-50%);
  pointer-events: auto;
}

.tt-tool-embed--wildlife .wc-pin.is-open .wc-bubble,
.tt-tool-embed--wildlife .wc-pin.is-open .wc-bubble[hidden] {
  display: block !important;
}

/* Keep tips inside the map: flip by pin edge */
.tt-tool-embed--wildlife .wc-pin[data-edge-x="left"] .wc-bubble {
  left: 0;
  transform: none;
}

.tt-tool-embed--wildlife .wc-pin[data-edge-x="right"] .wc-bubble {
  left: auto;
  right: 0;
  transform: none;
}

/* Near the bottom edge, open above so the tip stays on the map */
.tt-tool-embed--wildlife .wc-pin[data-edge-y="bottom"] .wc-bubble {
  top: auto;
  bottom: calc(100% + 0.35rem);
}

.tt-tool-embed--wildlife .wc-bubble__site {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--wc-primary);
}

.tt-tool-embed--wildlife .wc-bubble__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tt-tool-embed--wildlife .wc-bubble__list li {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.tt-tool-embed--wildlife .wc-bubble__list small {
  display: block;
  margin-top: 0.12rem;
  color: #555;
  font-size: 0.66rem;
  font-style: normal;
  line-height: 1.35;
}

.tt-tool-embed--wildlife .wc-bubble__glyph {
  display: none;
}

.tt-tool-embed .wc-pin:not(.is-active) {
  opacity: 0.35;
}

/* Numbered brass route stops in itinerary shortcode */
.tt-tool-embed .gi-route-stops {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.tt-tool-embed .gi-route-stop {
  position: absolute;
  display: grid;
  place-items: center;
  width: 0.95rem;
  height: 0.95rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--gi-route, #b08d57);
  border: 1px solid var(--gi-route-ink, #f2ede4);
  color: var(--gi-route-ink, #f2ede4);
  font-family: "DM Sans", Poppins, sans-serif;
  font-size: 0.52rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.tt-tool-embed__day-chips {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.22rem;
}

.tt-tool-embed__day-chips li {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  font-size: 0.84rem;
  line-height: 1.3;
  color: var(--wc-muted);
}

.tt-tool-embed__day-chips strong {
  flex: 0 0 auto;
  color: var(--wc-primary);
  font-weight: 700;
}

.tt-tool-embed__link {
  font-weight: 600;
  color: var(--wc-sea) !important;
  text-decoration: none;
}

.tt-tool-embed__link:hover {
  text-decoration: underline;
}

.tt-tool-embed__meta {
  color: var(--wc-muted);
}

/* Wildlife embed: compact clock + month conditions */
.tt-tool-embed__month-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.tt-tool-embed__clock {
  flex: 0 0 auto;
}

.tt-tool-embed--wildlife .tt-tool-embed__clock .wc-clock-wrap,
.tt-tool-embed__clock .wc-clock-wrap {
  position: relative;
  width: 148px;
  max-width: 148px;
  height: 148px;
  margin: 0;
  aspect-ratio: 1;
}

.tt-tool-embed__clock .wc-clock {
  width: 100%;
  height: 100%;
  max-width: 148px;
  display: block;
}

.tt-tool-embed__clock .wc-clock__ring {
  stroke: rgba(8, 58, 128, 0.22);
  stroke-width: 10;
}

.tt-tool-embed__clock .wc-clock__months {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tt-tool-embed__clock .wc-clock__month {
  --i: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.55rem;
  height: 1.55rem;
  margin: -0.775rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--wc-deep);
  font-family: Poppins, DM Sans, sans-serif;
  font-size: 0.55rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(6, 42, 92, 0.12);
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
  transform:
    rotate(calc(var(--i) * 30deg))
    translateY(-3.5rem)
    rotate(calc(var(--i) * -30deg));
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.tt-tool-embed__clock .wc-clock__month:hover,
.tt-tool-embed__clock .wc-clock__month:focus-visible {
  background: var(--wc-foam);
  outline: 2px solid rgba(8, 58, 128, 0.3);
  outline-offset: 1px;
}

.tt-tool-embed__clock .wc-clock__month.is-active {
  background: var(--wc-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(8, 58, 128, 0.3);
  transform:
    rotate(calc(var(--i) * 30deg))
    translateY(-3.5rem)
    rotate(calc(var(--i) * -30deg))
    scale(1.08);
}

.tt-tool-embed__clock .wc-clock__center {
  position: absolute;
  inset: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.2rem;
  text-align: center;
  border-radius: 50%;
  background: linear-gradient(160deg, #fff, var(--wc-foam));
  border: 1px solid rgba(8, 58, 128, 0.1);
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.tt-tool-embed__clock .wc-clock__center-label {
  display: block;
  font-family: Poppins, DM Sans, sans-serif;
  font-weight: 700;
  font-size: 0.64rem;
  line-height: 1.1;
  color: var(--wc-deep);
}

.tt-tool-embed__clock .wc-clock__center-hint {
  display: block;
  font-size: 0.42rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--wc-muted);
}

.tt-tool-embed__summary {
  flex: 1 1 12rem;
  min-width: 0;
}

.tt-tool-embed__stats {
  display: grid;
  gap: 0.45rem 0.85rem;
  margin: 0;
}

.tt-tool-embed__stats > div {
  display: grid;
  gap: 0.08rem;
}

.tt-tool-embed__stats dt {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wc-sea);
}

.tt-tool-embed__stats dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  color: #333;
}

.tt-tool-embed__stats-wildlife dd {
  font-size: 0.84rem;
  line-height: 1.4;
}

@media (max-width: 575.98px) {
  .tt-tool-embed--wildlife .tt-tool-embed__clock .wc-clock-wrap,
  .tt-tool-embed__clock .wc-clock-wrap {
    width: 132px;
    max-width: 132px;
    height: 132px;
  }

  .tt-tool-embed__clock .wc-clock {
    max-width: 132px;
  }

  .tt-tool-embed__clock .wc-clock__month {
    width: 1.45rem;
    height: 1.45rem;
    margin: -0.725rem;
    font-size: 0.52rem;
    transform:
      rotate(calc(var(--i) * 30deg))
      translateY(-3.15rem)
      rotate(calc(var(--i) * -30deg));
  }

  .tt-tool-embed__clock .wc-clock__month.is-active {
    transform:
      rotate(calc(var(--i) * 30deg))
      translateY(-3.15rem)
      rotate(calc(var(--i) * -30deg))
      scale(1.08);
  }

  .tt-tool-embed__clock .wc-clock__center-label {
    font-size: 0.58rem;
  }
}

.tt-tool-embed.is-loading .tt-tool-embed__map {
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .tt-tool-embed .gi-route__line.is-cruise {
    animation: none;
  }

  .tt-tool-embed__clock .wc-clock__month {
    transition: none;
  }
}
