/* Hilton Head DPCalendar targeted fixes 1_0_4 */

/* Keep the booking form at the bottom of the single-event page */
.com-dpcalendar-event__description {
  order: 8 !important;
}

.com-dpcalendar-event__locations {
  order: 11 !important;
}

.com-dpcalendar-event__tickets {
  order: 13 !important;
}

.com-dpcalendar-event__custom-text-after {
  order: 14 !important;
}

.com-dpcalendar-event__booking {
  order: 15 !important;
}

.com-dpcalendar-event__booking-form {
  order: 99 !important;
}

/* Hide Country row in venue details */
.com-dpcalendar-event__locations .dp-location__details dl:last-of-type,
.com-dpcalendar-location .dp-location__details dl:last-of-type {
  display: none !important;
}

/* Safer explicit hide for the country value itself */
.com-dpcalendar-event__locations .dp-location__details .dp-location__country,
.com-dpcalendar-location .dp-location__details .dp-location__country {
  display: none !important;
}

/* Default stacked venue layout */
.com-dpcalendar-event__locations .dp-location > .dp-heading_small {
  display: block !important;
  margin: 0 0 1rem !important;
  line-height: 1.15 !important;
}

.com-dpcalendar-event__locations .dp-location > .dp-map {
  margin: 0 0 20px !important;
}

.com-dpcalendar-event__locations .dp-location > .dp-location__details {
  margin: 0 0 1rem !important;
}

.com-dpcalendar-event__locations .dp-location > .dp-button-bar {
  margin: 0 !important;
}

/* lg and up: title full width, map left, details/buttons right */
@media (min-width: 992px) {
  .com-dpcalendar-event__locations .dp-location {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr) !important;
    grid-template-areas:
      "title title"
      "map details"
      "map buttons"
      "desc desc" !important;
    gap: 20px !important;
    align-items: start !important;
  }

  .com-dpcalendar-event__locations .dp-location > .dp-heading_small {
    grid-area: title !important;
    margin: 0 !important;
    position: relative;
    z-index: 1;
  }

  .com-dpcalendar-event__locations .dp-location > .dp-map {
    grid-area: map !important;
    margin: 0 !important;
  }

  .com-dpcalendar-event__locations .dp-location > .dp-location__details {
    grid-area: details !important;
    margin: 0 !important;
  }

  .com-dpcalendar-event__locations .dp-location > .dp-button-bar {
    grid-area: buttons !important;
    margin: 0 !important;
    align-self: start !important;
  }

  .com-dpcalendar-event__locations .dp-location > .dp-location__description {
    grid-area: desc !important;
    margin: 0 !important;
  }
}
