/* Shared location-page action hierarchy.
   JavaScript adds .hg-location-actions-arranged only after the original
   controls have been moved successfully, preserving progressive enhancement. */

body.hg-location-actions-arranged .hg-location-action-center {
  margin: 10px 0 16px;
  padding: 18px;
  border: 1px solid #d9e5e1;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7fbfa 0%, #fff 100%);
  box-shadow: 0 5px 18px rgba(20, 70, 61, 0.08);
  text-align: left;
}

body.hg-location-actions-arranged .hg-location-action-center__heading {
  margin-bottom: 14px;
}

body.hg-location-actions-arranged .hg-location-action-center__eyebrow,
body.hg-location-actions-arranged .hg-location-action-center__title {
  display: block;
}

body.hg-location-actions-arranged .hg-location-action-center__eyebrow,
body.hg-location-actions-arranged .hg-location-action-center__label {
  color: #4c625b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.hg-location-actions-arranged .hg-location-action-center__title {
  margin-top: 3px;
  color: #193d35;
  font-family: "brother-1816-printed", "Proxima", Helvetica, Arial, sans-serif;
  font-size: 25px;
  line-height: 1.15;
}

body.hg-location-actions-arranged .hg-location-action-center__primary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 9px;
}

body.hg-location-actions-arranged .hg-location-action-center__primary[hidden],
body.hg-location-actions-arranged .hg-location-action-center__detail-group[hidden],
body.hg-location-actions-arranged .hg-location-action-center__more[hidden] {
  display: none;
}

body.hg-location-actions-arranged .hg-location-action-center__primary > *,
body.hg-location-actions-arranged .hg-location-action-center__primary button,
body.hg-location-actions-arranged .hg-location-action-center__primary a {
  box-sizing: border-box;
  min-width: 0;
}

body.hg-location-actions-arranged .hg-lac-action--map,
body.hg-location-actions-arranged .hg-lac-action--route,
body.hg-location-actions-arranged .hg-lac-action--save {
  display: flex;
  margin: 0 !important;
}

body.hg-location-actions-arranged .hg-lac-action--map .hg-np-btn,
body.hg-location-actions-arranged .hg-lac-action--map .hg-map-pill,
body.hg-location-actions-arranged .hg-lac-action--route .hg-route-pill,
body.hg-location-actions-arranged .hg-lac-action--save .hg-itinerary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 0 !important;
  padding: 8px 12px !important;
  border-radius: 12px;
  white-space: nowrap;
}

body.hg-location-actions-arranged .hg-lac-action--map .hg-np-btn,
body.hg-location-actions-arranged .hg-lac-action--map .hg-map-pill {
  border-color: #1f6fba !important;
  background: #1f6fba !important;
  box-shadow: 0 3px 10px rgba(27, 105, 86, 0.2);
  color: #fff !important;
  font-size: 14px;
}

body.hg-location-actions-arranged .hg-lac-action--map .hg-np-btn *,
body.hg-location-actions-arranged .hg-lac-action--map .hg-map-pill * {
  color: #fff !important;
}

body.hg-location-actions-arranged .hg-lac-action--route .hg-route-pill {
  border: 2px solid #1d9771 !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #176b4a !important;
}

body.hg-location-actions-arranged .hg-lac-action--route .hg-route-pill-beta {
  background: #dff3ea;
  color: #176b4a;
}

/* Safety labels use white text, so hold their shared-card fills comfortably
   above WCAG AA instead of inheriting borderline legacy amber/orange tones. */
body.hg-location-actions-arranged .hg-location-action-center .hg-tc-pill.is-alert {
  background: #963b00 !important;
}

body.hg-location-actions-arranged .hg-location-action-center .hg-tc-pill.is-caution {
  background: #765300 !important;
}

body.hg-location-actions-arranged .hg-location-action-center__detail-group {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #dfe9e6;
}

body.hg-location-actions-arranged .hg-location-action-center__label {
  display: block;
  margin-bottom: 8px;
}

body.hg-location-actions-arranged .hg-location-action-center__details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body.hg-location-actions-arranged .hg-location-action-center__details > * {
  display: flex;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  margin: 0 !important;
}

body.hg-location-actions-arranged .hg-location-action-center__details button,
body.hg-location-actions-arranged .hg-location-action-center__details > span > span {
  box-sizing: border-box;
  min-height: 36px;
}

body.hg-location-actions-arranged .hg-lac-detail--drive {
  flex: 0 1 auto;
}

body.hg-location-actions-arranged .hg-lac-detail--drive .hg-dt-text {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

body.hg-location-actions-arranged .hg-location-action-center__more {
  margin-top: 11px;
  border-top: 1px solid #e6eeeb;
}

body.hg-location-actions-arranged .hg-location-action-center__more > summary {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: #315f54;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}

body.hg-location-actions-arranged .hg-location-action-center__more > summary::-webkit-details-marker {
  display: none;
}

body.hg-location-actions-arranged .hg-location-action-center__more > summary::after {
  content: "\203A";
  margin-left: 8px;
  font-size: 20px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}

body.hg-location-actions-arranged .hg-location-action-center__more[open] > summary::after {
  transform: rotate(-90deg);
}

body.hg-location-actions-arranged .hg-location-action-center__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  margin-left: 7px;
  border-radius: 999px;
  background: #e2efeb;
  color: #315f54;
  font-size: 11px;
}

body.hg-location-actions-arranged .hg-location-action-center__count:empty {
  display: none;
}

body.hg-location-actions-arranged .hg-location-action-center__more-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding: 2px 0 9px;
}

body.hg-location-actions-arranged .hg-location-action-center__more-items > * {
  display: flex;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}

body.hg-location-actions-arranged .hg-location-action-center__more-items button,
body.hg-location-actions-arranged .hg-location-action-center__more-items a {
  box-sizing: border-box;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  white-space: nowrap;
}

body.hg-location-actions-arranged .hg-location-action-center__source-status:empty {
  display: none;
}

body.hg-location-actions-arranged .hg-location-action-center__source-actions {
  margin-top: 0 !important;
  padding-top: 0;
}

/* The same fee information remains available in Quick details. */
body.hg-location-actions-arranged.hg-location-actions-fee-in-details .fee-indicator-badge {
  display: none !important;
}

@media (max-width: 767px) {
  body.hg-location-actions-arranged .hg-location-action-center {
    margin: 10px 10px 14px;
    padding: 16px;
  }

  body.hg-location-actions-arranged .hg-location-action-center__eyebrow,
  body.hg-location-actions-arranged .hg-location-action-center__label {
    font-size: 11px;
  }

  body.hg-location-actions-arranged .hg-location-action-center__title {
    font-size: 22px;
  }

  body.hg-location-actions-arranged .hg-location-action-center__primary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  body.hg-location-actions-arranged .hg-lac-action--map {
    grid-column: 1 / -1;
  }

  body.hg-location-actions-arranged .hg-location-action-center__primary.is-two-actions > :not(.hg-lac-action--map) {
    grid-column: 1 / -1;
  }

  body.hg-location-actions-arranged .hg-location-action-center__details {
    gap: 12px 7px;
  }

  body.hg-location-actions-arranged .hg-location-action-center__details button {
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
  }

  body.hg-location-actions-arranged .hg-lac-action--route .hg-route-pill {
    gap: 5px;
    padding: 7px 6px !important;
    font-size: 12px;
  }

  body.hg-location-actions-arranged .hg-lac-action--route .hg-route-pill-text {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }

  body.hg-location-actions-arranged .hg-lac-action--route .hg-route-pill-beta {
    margin-left: 0;
    padding-right: 5px;
    padding-left: 5px;
  }

  body.hg-location-actions-arranged .hg-lac-detail--drive {
    flex: 1 0 100%;
  }

  body.hg-location-actions-arranged .hg-lac-detail--drive .hg-dt-btn {
    justify-content: center;
    width: 100%;
    font-size: 12px;
  }

  body.hg-location-actions-arranged .hg-location-action-center__source-actions {
    padding: 0 10px 4px;
  }
}

@media (max-width: 350px) {
  body.hg-location-actions-arranged .hg-location-action-center__primary,
  body.hg-location-actions-arranged .hg-location-action-center__more-items {
    grid-template-columns: 1fr;
  }

  body.hg-location-actions-arranged .hg-lac-action--map {
    grid-column: auto;
  }
}

@media print {
  body.hg-location-actions-arranged .hg-location-action-center {
    display: none !important;
  }
}
