/* BAC dev.32: flexible price guide inside Elementor columns and responsive
   editor widths. Only the layout is constrained; club prices and text stay
   controlled by the server and the existing Elementor widgets.
   No forced clipping: cards, buttons and explanatory text remain readable. */
.bac-elementor-surface:has(> .bac-price-guide) {
    min-width:0;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
}
.bac-price-guide {
    width:100%;
    min-width:0;
    max-width:min(100%,1240px);
    box-sizing:border-box;
    container-type:inline-size;
    overflow-wrap:break-word;
}
.bac-price-guide :is(.bac-price-section,.bac-price-cards,.bac-price-card,.bac-price-extras,.bac-price-small,.bac-price-book,.bac-guest-night,.bac-price-bottom,.bac-price-future) {
    min-width:0;
    box-sizing:border-box;
}
.bac-price-guide :is(.bac-price-section,.bac-price-cards,.bac-price-extras,.bac-price-small,.bac-price-book,.bac-guest-night,.bac-price-bottom,.bac-price-future) {
    max-width:100%;
}
.bac-price-guide :is(.bac-price-small,.bac-price-extras p,.bac-guest-night p,.bac-guest-night h3,.bac-price-card p,.bac-price-card h3) {
    white-space:normal;
    overflow-wrap:break-word;
}
.bac-price-guide .bac-price-small {
    width:100%;
    /* Existing .bac-price-section>p max-width:730px stays in charge unless
       the new Elementor "Explanation maximum width" control is set. */
}
.bac-price-guide .bac-price-extras {
    grid-template-columns:repeat(2,minmax(0,1fr));
}
.bac-price-guide .bac-price-card {
    min-width:0;
    max-width:100%;
}
.bac-price-guide .bac-price-card :is(dt,dd) {
    min-width:0;
    overflow-wrap:break-word;
}
.bac-price-guide .bac-price-book :is(.bac-price-button,p,h3) {
    max-width:100%;
    overflow-wrap:break-word;
}
/* Container queries adapt to the widget's true width. Media queries alone
   do not work when Elementor sidebars or narrower site columns are open. */
@container (max-width:940px) {
    .bac-price-guide .bac-price-cards {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@container (max-width:630px) {
    .bac-price-guide .bac-price-cards,
    .bac-price-guide .bac-price-extras,
    .bac-price-guide .bac-price-bottom {
        grid-template-columns:minmax(0,1fr);
    }
    .bac-price-guide .bac-price-book {
        padding:clamp(18px,4vw,30px);
    }
}
@media (max-width:600px) {
    .bac-price-guide .bac-price-cards {
        grid-template-columns:minmax(0,1fr);
    }
}

/* dev80 – do not stretch the last public pricing/guest card to viewport
 * height on phones, leaving a screen of blank space before the next block. */
@media(max-width:767px){
  .bac-price-guide{max-width:100%;min-width:0;overflow:visible}
  .bac-price-guide .bac-price-bottom{
    display:grid;grid-template-columns:minmax(0,1fr)!important;
    align-items:start!important;align-content:start!important;
    grid-auto-rows:min-content!important;gap:18px!important;
    height:auto!important;min-height:0!important;margin-bottom:0!important;
  }
  .bac-price-guide .bac-price-bottom > *,
  .bac-price-guide .bac-price-book,
  .bac-price-guide .bac-guest-night{
    align-self:start!important;height:auto!important;min-height:0!important;
    max-height:none!important;margin-bottom:0!important;
  }
  .bac-price-guide .bac-price-bottom:empty{display:none}
}

/* When the price guide is placed in its own Elementor section, avoid a
 * desktop minimum-height carrying through to the mobile guest-booking CTA. */
@media(max-width:767px){
  /* A flex-column child with align-self:start shrink-wraps to its min-content
     width. This formerly reduced the entire Current prices panel to a
     one-character column on the original bac-woodland-page template. */
  .bac-woodland-page :is(.e-con,.elementor-column):has(> .elementor-widget:has(.bac-price-guide)),
  .bac-woodland-page :is(.elementor-widget,.elementor-widget-container):has(> .bac-price-guide),
  .bac-woodland-page .elementor-widget:has(.bac-price-guide),
  .bac-woodland-page .elementor-widget:has(.bac-price-guide) > .elementor-widget-container,
  .bac-woodland-page .bac-elementor-surface:has(> .bac-price-guide){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:0!important;
    height:auto!important;
    align-self:stretch!important;
    box-sizing:border-box;
  }
  .bac-woodland-page :is(.e-con,.elementor-column):has(> .elementor-widget:has(.bac-price-guide)){
    padding-bottom:0!important;
  }
  /* Preserve future prices when present. The optional widget's empty shell
     otherwise inherits the Elementor section height and looks like pages of
     blank space below the guest-night permit card. */
  .bac-woodland-page :is(.elementor-widget-bac-price_future,.elementor-widget-bac-price-future):not(:has(.bac-price-guide)){
    display:none!important;
    height:0!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
  }
}

/* dev82 – mobile blank-space fix for the actual transformed Elementor permit
 * page. Older fixes targeted .bac-woodland-page (a legacy template), while
 * the live transformed page uses .bac-woodland-layout and .bac-woodland-content.
 * Scope these overrides to price widgets and their layout ancestors so that
 * other Elementor sections, the basket and forms remain unaffected. */
@media (max-width:767px) {
  .bac-woodland-layout .bac-woodland-content:has(.bac-price-guide),
  .bac-woodland-layout .bac-woodland-content :is(.e-con,.e-con-inner,.elementor-container,.elementor-column,.elementor-widget-wrap,.elementor-widget,.elementor-widget-container):has(.bac-price-guide),
  .bac-woodland-layout .bac-woodland-content :is(.e-con,.e-con-inner,.elementor-container,.elementor-column,.elementor-widget-wrap,.elementor-widget,.elementor-widget-container):has(.bac-price-book) {
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    align-content:start!important;
  }
  .bac-woodland-layout .bac-woodland-content :is(.bac-elementor-surface,.bac-price-guide,.bac-price-section,.bac-price-book,.bac-guest-night) {
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    margin-bottom:0;
  }
  .bac-woodland-layout .bac-price-section:has(> .bac-guest-night) {
    display:flow-root;
    padding-bottom:clamp(16px,5vw,30px)!important;
  }
  .bac-woodland-layout .bac-price-section > .bac-guest-night {
    display:block;
    clear:both;
    margin:20px 0 0!important;
    width:100%;
    max-width:100%;
  }
  /* Hide a completely empty optional price widget rather than letting
   * Elementor's old minimum-height settings reserve a blank section. */
  .bac-woodland-layout .bac-elementor-surface:empty,
  .bac-woodland-layout .elementor-widget-container:empty {
    display:none!important;
    min-height:0!important;
  }
}
/* Corrected Elementor markup may also place the price widget in a generic
 * container, without .bac-woodland-layout. These selectors only target the
 * specific guest-night pricing section. */
@media(max-width:767px){
  .elementor-widget-container:has(> .bac-elementor-surface > .bac-price-guide) {
    min-height:0!important;height:auto!important;max-height:none!important;
  }
  .bac-price-guide .bac-price-section:has(> .bac-guest-night) {
    min-height:0!important;height:auto!important;max-height:none!important;
    align-content:start!important;
  }
  .bac-price-guide .bac-price-section > .bac-guest-night {
    min-height:0!important;height:auto!important;max-height:none!important;
  }
}

/* dev84: the optional future-price widget can return no HTML while Elementor
 * still reserves a full viewport-height shell. Hide only genuinely empty
 * future-price widgets. The narrowly scoped script also collapses otherwise
 * empty ancestor columns/containers; populated price schedules stay intact. */
@media (max-width:767px) {
  .bac-woodland-layout :is(.elementor-widget-bac-price_future,.elementor-widget-bac-price-future):has(.bac-price-optional-empty),
  .bac-woodland-layout :is(.elementor-widget-bac-price_future,.elementor-widget-bac-price-future):has(.bac-elementor-surface:empty),
  .bac-woodland-layout .bac-empty-future-price,
  .bac-woodland-layout .bac-empty-future-shell {
    display:none!important;
    min-height:0!important;
    height:0!important;
    padding:0!important;
    margin:0!important;
  }
}
