/* Layout containment only. Approved WP Travel Engine trip components inherit the original child theme styles. */
body.single-trip #jeepa-content.jeepa-trip-detail-shell { max-width: 1320px; width: calc(100% - 7vw); margin: 0 auto; padding: 46px 0 100px; }
body.single-trip .jeepa-trip-detail-shell .site-main { min-width:0; }
body.single-trip .jeepa-trip-detail-shell img { max-width:100%; height:auto; }
body.single-trip .jeepa-trip-detail-shell .wpte-gallery-wrapper img { width:100%; }
body.single-trip .jeepa-trip-detail-shell .wpte-highlights-card[hidden] { display:none!important; }
body.single-trip .wpte-tabs-container .tab-content { overflow-wrap:break-word; }
body.single-trip .wpte-tabs-container .itinerary-row { min-width:0; }
@media(max-width:850px) { body.single-trip #jeepa-content.jeepa-trip-detail-shell { width:calc(100% - 36px); padding:36px 0 70px; } }
@media(max-width:540px) { body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .tab-content {padding-inline:18px;} }

/* WP Travel Engine outputs the same .row / #primary / #secondary structure
   as the published site. Recreate its parent-theme columns without Bootstrap. */
.jeepa-trip-detail-shell #wp-travel-trip-wrapper > .row {
  display:grid;
  grid-template-columns:minmax(0, 2fr) minmax(290px, 1fr);
  column-gap:38px;
  align-items:start;
  margin:0;
}
.jeepa-trip-detail-shell #wp-travel-trip-wrapper #primary,
.jeepa-trip-detail-shell #wp-travel-trip-wrapper #secondary {
  width:100%;
  max-width:100%;
  min-width:0;
  float:none;
  margin:0;
  padding:0;
}
.jeepa-trip-detail-shell #wp-travel-trip-wrapper #secondary .widget-area,
.jeepa-trip-detail-shell #wp-travel-trip-wrapper #secondary .widget {
  max-width:100%;
}
@media(max-width:900px){
  .jeepa-trip-detail-shell #wp-travel-trip-wrapper > .row {
    grid-template-columns:minmax(0,1fr);
    row-gap:36px;
  }
}

/* JEEPA-TRIP-SIDEBAR-PRESERVATION.
   Keep the original custom WP core block-widget design full bleed.
   A generic rule in the preserved child theme pads direct widget children.
   That rule must not pad the custom widget's own outer shell. */
body.single-trip .jeepa-trip-detail-shell #secondary .widget.widget_block > .jeepa-contact-box,
body.single-trip .jeepa-trip-detail-shell #secondary .widget.widget_block > .jeepa-links-box {
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
  width: 100%;
}
body.single-trip .jeepa-trip-detail-shell #secondary .widget.widget_block .jeepa-contact-header,
body.single-trip .jeepa-trip-detail-shell #secondary .widget.widget_block .jeepa-links-header {
  width: 100%;
  box-sizing: border-box;
}
body.single-trip .jeepa-trip-detail-shell #secondary .widget.widget_block .jeepa-contact-item {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}
body.single-trip .jeepa-trip-detail-shell #secondary .widget.widget_block .jeepa-contact-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}
body.single-trip .jeepa-trip-detail-shell #secondary .widget.widget_block .jeepa-contact-value {
  white-space: normal;
  overflow-wrap: anywhere;
}
body.single-trip .jeepa-trip-detail-shell #secondary .widget.widget_block .jeepa-links-list a {
  overflow-wrap: anywhere;
}
body.single-trip .jeepa-trip-detail-shell #secondary .widget.widget_block .jeepa-contact-cta {
  box-sizing: border-box;
  max-width: 100%;
}

/* JEEPA MOBILE ITINERARY CARDS
 * A compact editorial day-card layout for phones and portrait tablets.
 * The WP Travel Engine title/toggle markup and native accordion behavior
 * remain untouched. The old 60px timeline rail and 64px plugin margin
 * were consuming nearly half the text column on 375px screens.
 */
@media (max-width: 900px) {
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .post-data.itinerary.wte-trip-itinerary-v2 {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 8px 0 0 !important;
  }

  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    background: #fff !important;
    border: 1px solid #dce8e3 !important;
    border-radius: 16px !important;
    box-shadow: 0 5px 20px rgba(12, 67, 52, .07) !important;
    overflow: hidden !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row:last-child {
    margin-bottom: 0 !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row::before,
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row::after {
    display: none !important;
    content: none !important;
    border: 0 !important;
  }

  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .wte-itinerary-head-wrap {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0;
    min-height: 0 !important;
    gap: 9px;
    margin: 0 !important;
    padding: 16px 17px !important;
    background: #f3faf7 !important;
    border: 0 !important;
    border-bottom: 1px solid #e1ece7 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .wte-itinerary-head-wrap > .title {
    box-sizing: border-box !important;
    float: none !important;
    position: static !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    display: inline-flex !important;
    align-self: flex-start !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100%;
    height: auto !important;
    margin: 0 !important;
    padding: 5px 11px !important;
    background: #e0f3ea !important;
    border: 1px solid #b4dec9 !important;
    border-radius: 999px !important;
    color: #08634c !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    font-weight: 800 !important;
    letter-spacing: .045em !important;
    white-space: normal !important;
    text-transform: uppercase !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .wte-itinerary-head-wrap > .title::before,
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .wte-itinerary-head-wrap > .title::after {
    display: none !important;
    content: none !important;
  }

  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .accordion-tabs-toggle {
    box-sizing: border-box !important;
    display: flex !important;
    position: relative !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: 0 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 34px 0 0 !important;
    border: 0 !important;
    color: #143529 !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .itinerary-title {
    box-sizing: border-box !important;
    display: block !important;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
    white-space: normal !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .itinerary-title span {
    display: block !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    color: #16372e !important;
    font-size: 17px !important;
    line-height: 1.42 !important;
    font-weight: 750 !important;
    text-align: left;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .accordion-tabs-toggle .rotator {
    position: absolute !important;
    right: 0 !important;
    left: auto !important;
    top: 50% !important;
    width: 23px !important;
    height: 23px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-color: #10896b !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .accordion-tabs-toggle.active .rotator {
    transform: translateY(-50%) rotate(180deg) !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .itinerary-content {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 17px 19px !important;
    background: #fff;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .itinerary-content > *:first-child:not(.itinerary-title) {
    margin-top: 0 !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .itinerary-content .content {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 17px 0 0 !important;
    border: 0 !important;
    font-size: 16px !important;
    line-height: 1.75 !important;
    color: #334155 !important;
    overflow-wrap: break-word;
    text-align: left !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .itinerary-content .content :where(p,li) {
    font-size: inherit !important;
    line-height: inherit !important;
    text-align: left !important;
    overflow-wrap: break-word;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .itinerary-row .itinerary-content .content p:last-child {
    margin-bottom: 0 !important;
  }
}

@media (max-width: 480px) {
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .tab-content {
    box-sizing: border-box !important;
    padding-inline: 12px !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .wte-trip-itinerary-v2 .wte-itinerary-head-wrap {
    padding: 14px 14px !important;
  }
  body.single-trip .jeepa-trip-detail-shell .wpte-tabs-container .wte-trip-itinerary-v2 .itinerary-content {
    padding-inline: 14px !important;
  }
}
