/* ---- Pit stops: the card on the Maps tile, the card in a map popup, and the list in the Maps window ---- */

/* The card (all variants) */
.pitCard { position: relative; box-sizing: border-box; display: grid; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--paper) 96%, transparent); color: var(--ink); text-align: left; box-shadow: 0 8px 20px #00000026; font-size: .75rem; line-height: 1.35; }
.pitMedia { position: relative; overflow: hidden; background: color-mix(in srgb, var(--pit, #44546a) 18%, var(--paper)); }
.pitPhoto, .pitArt { display: block; width: 100%; height: 100%; object-fit: cover; }
.pitArt { position: relative; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--pit) 45%, #fff) 0, transparent 60%), linear-gradient(150deg, var(--pit), color-mix(in srgb, var(--pit) 62%, #000)); }
.pitIcon { width: 46%; max-width: 64px; height: auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pitTag { position: absolute; left: 5px; bottom: 5px; max-width: calc(100% - 10px); overflow: hidden; padding: 1px 6px; border-radius: 999px; background: #14213de6; color: #fff; font-size: .75rem; font-weight: 700; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.pitBody { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 9px 11px 10px; }
.pitEye { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; color: var(--muted); font-size: .75rem; font-weight: 600; }
.pitChip { padding: 1px 8px; border: 1px solid color-mix(in srgb, var(--pit, #44546a) 55%, var(--paper)); border-radius: 999px; background: color-mix(in srgb, var(--pit, #44546a) 14%, var(--paper)); color: var(--ink); font-size: .75rem; font-weight: 700; }
.pitName { margin: 0; font-size: .9375rem; font-weight: 700; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; }
.pitNote { margin: 0; color: var(--ink); }
.pitNote[hidden], .pitLink[hidden], .pitDetail[hidden] { display: none; }
.pitActions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 2px; }
.pitLink { display: inline-flex; align-items: center; min-height: 24px; color: var(--accent-ink, #0f4fa8); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.pitShow { min-height: 26px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font: inherit; font-size: .75rem; font-weight: 650; cursor: pointer; }
.pitShow:hover, .pitLink:hover { background-color: color-mix(in srgb, var(--accent) 9%, var(--paper)); }
.pitFine { margin: 0; color: var(--muted); font-size: .75rem; }
.pitFine:empty { display: none; }
.pitCredit { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.3; overflow-wrap: anywhere; }
.pitCredit[hidden] { display: none; }
.pitCreditLink { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pitCreditLink:hover { color: var(--ink); }
.pitCreditLink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.pit-tile .pitCredit { font-size: .75rem; }
.mapCanvas6 .pitCard .pitCredit { color: #5d636c; }
.mapCanvas6 .pitCard .pitCreditLink:hover { color: #242424; }

/* On the Maps tile: sits where the caption card sits, and fades in and out as the pin arrives and leaves */
.pit-tile { position: absolute; left: 12px; right: 12px; bottom: 30px; z-index: 3; grid-template-columns: 66px minmax(0, 1fr); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s ease, visibility 0s linear .35s; }
.pit-tile.pitOn { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.pit-tile.pitInstant { transition: none; }
.pit-tile .pitMedia { grid-row: 1 / span 1; align-self: stretch; }
.pit-tile .pitBody { gap: 3px; padding: 8px 10px 9px; }
.pit-tile .pitNote { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.pit-tile .pitName { font-size: .875rem; }
.pit-tile .pitTag { left: 3px; right: 3px; bottom: 3px; padding: 0 3px; font-size: .75rem; text-align: center; }
.pit-tile .pitIcon { width: 52%; }
#map .providerpreview.hasTour.pitShowing > div:not(.tourMap):not(.tourControls) { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s ease, visibility 0s linear .35s; }
#map .providerpreview.hasTour > div:not(.tourMap):not(.tourControls) { transition: opacity .35s ease, visibility 0s; }
.pitLive { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@container (min-width: 561px) {
  .pit-tile { right: auto; width: 258px; }
}
@container (max-width: 560px) {
  .pit-tile .pitNote { -webkit-line-clamp: 3; line-clamp: 3; }
}

/* In a map popup: the picture on top */
.pit-popup { grid-template-columns: minmax(0, 1fr); width: 100%; box-shadow: none; border: 0; border-radius: 10px; background: transparent; }
.pit-popup .pitMedia { height: 84px; border-radius: 10px; }
.pit-popup .pitBody { padding: 8px 2px 2px; }
.pit-popup .pitName { font-size: 1rem; }
.pit-popup .pitNote { font-size: .8125rem; }
.pit-popup .pitIcon { width: 36%; }
.pit-popup .pitTag { font-size: .75rem; }
.pit-popup .pitLink { color: #0b4f9e; }
.mapCanvas6 .leaflet-popup-content { margin: 10px; }
.mapCanvas6 .pitCard { color: #242424; font-family: inherit; }
.mapCanvas6 .pitCard .pitName, .mapCanvas6 .pitCard .pitNote { color: #242424; }
.mapCanvas6 .pitCard .pitEye, .mapCanvas6 .pitCard .pitFine { color: #5d636c; }
.mapCanvas6 .pitCard .pitChip { color: #242424; }
.mapCanvas6 .pitCard .pitName { margin: 0; }
.mapCanvas6 .pitCard p { margin: 0; }

/* The marker on the interactive map */
.leaflet-marker-icon.pitMarker6 { background: none; border: 0; }
.pitDot { display: inline-grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; border: 2px solid #fff; border-radius: 50%; background: var(--pit); color: #fff; box-shadow: 0 2px 6px #00000047; box-sizing: border-box; transition: transform .15s ease; }
.pitDot .pitIcon { width: 62%; stroke-width: 2; }
.pitDot.isActive { transform: scale(1.35); box-shadow: 0 0 0 3px #fff, 0 3px 10px #0000005c; }

/* The list in the Maps window: beside the map when the window is wide, under it when it is narrow */
.mapBody6 { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.mapBody6 > .mapArea6 { flex: 1 1 auto; min-height: 220px; }
/* A narrow window grows and scrolls instead of squeezing the map away */
.providerApp6.hasPits6 { height: auto; min-height: 100%; }
.hasPits6 > .mapBody6 { flex: 1 0 auto; }
.hasPits6 .mapBody6 > .mapArea6 { flex: 0 0 auto; height: 430px; }
.mapCanvas6 .pit-popup .pitMedia { height: 64px; }
@container (min-width: 720px) {
  .providerApp6.hasPits6 { height: 100%; }
  .hasPits6 > .mapBody6 { flex: 1 1 0; }
  .hasPits6 .mapBody6 > .mapArea6 { flex: 1 1 auto; height: auto; }
  .mapCanvas6 .pit-popup .pitMedia { height: 84px; }
  .mapBody6 { flex-direction: row; }
  .mapBody6 > .mapArea6 { min-width: 0; }
  .mapBody6 > .pitPanel { flex: 0 0 272px; max-height: none; border-top: 0; border-left: 1px solid var(--line); }
  .mapBody6 > .pitPanel .pitList { grid-template-columns: minmax(0, 1fr); }
}
.pitPanel { flex: 0 0 auto; max-height: 200px; overflow: auto; overscroll-behavior: contain; padding: 10px 14px 12px; border-top: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.pitHeading { margin: 0; font-size: .9375rem; font-weight: 700; }
.pitHint { margin: 2px 0 8px; color: var(--muted); font-size: .75rem; }
.pitList { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.pitChoose { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; align-items: center; width: 100%; min-height: 44px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pitChoose .pitDot { grid-row: 1 / span 2; }
.pitChooseName { overflow: hidden; font-size: .8125rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.pitChooseMeta { overflow: hidden; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.pitChoose:hover { background: color-mix(in srgb, var(--accent) 7%, var(--paper)); }
.pitChoose[aria-current="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--paper)); box-shadow: inset 0 0 0 1px var(--accent); }
.pitChoose:focus-visible, .pitShow:focus-visible, .pitLink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pitStatus { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pitDetail { margin-top: 10px; }
.pitDetail .pit-popup { max-width: 420px; border: 1px solid var(--line); padding: 10px; background: var(--bg); }
@media (max-width: 560px) {
  .pitList { grid-template-columns: minmax(0, 1fr); }
  .pitPanel { max-height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  .pit-tile, #map .providerpreview.hasTour.pitShowing > div:not(.tourMap):not(.tourControls), #map .providerpreview.hasTour > div:not(.tourMap):not(.tourControls), .pitDot { transition: none; }
}
