/* =========================================================
   IRRIGATION RECOMMENDATION PAGE — LAYOUT CONTRACT
   ---------------------------------------------------------
   Goals:
   1) The page must fill the available content area (parent),
      NOT force the browser window to scroll.
   2) The header stays at the top at natural height.
   3) Only the plant-units body scrolls vertically.
   4) Never create horizontal overflow (prevents sidebar X-scroll).
   5) Last element is fully visible (extra bottom padding).
   ---------------------------------------------------------
   Required parent behavior (in app.css):
   - #page-content / .sg-page-content should be display:flex (column)
     and overflow:hidden (no scroll there).
   ========================================================= */


/* ---------------------------------------------------------
   0) Minimal horizontal overflow guard (optional)
   NOTE: This prevents global X-scrollbars if something leaks.
   If you don't want any global effect, you can remove this block.
   --------------------------------------------------------- */
html, body {
  overflow-x: hidden !important;
}


/* ---------------------------------------------------------
   1) Page wrapper (fills available parent height)
   IMPORTANT: flex: 1 1 auto makes this element actually
   take the remaining height inside #page-content (flex column).
   Without it, inner scroll regions may not get a real height.
   --------------------------------------------------------- */
.irrigation-recommendation-page {
  flex: 1 1 auto;           /* ✅ CRITICAL: fill parent flex height */
  height: 100%;             /* ok to keep */
  width: 100%;

  display: flex;
  flex-direction: column;

  overflow: hidden;         /* no scrollbars on the page wrapper */
  min-height: 0;            /* allow children to scroll */
  min-width: 0;             /* prevent horizontal overflow */
}


/* ---------------------------------------------------------
   2) Header area (natural height, full width, no X overflow)
   --------------------------------------------------------- */
.irrigation-recommendation-header {
  flex: 0 0 auto;
  width: 100%;

  min-height: 0;
  min-width: 0;
  
  overflow-x: hidden;       /* ensure header never causes X scroll */
}


/* ---------------------------------------------------------
   3) Scrollable body (ONLY scrolling region)
   - Takes remaining height under header
   - Scrolls vertically
   - Never scrolls horizontally
   --------------------------------------------------------- */
.irrigation-recommendation-plant-units-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  height: 69vh;

  display: block;                 /* ✅ important */
  overflow-y: auto !important;
  overflow-x: hidden !important;

  padding-top: 6px;
  padding-bottom: 24px;
  scroll-padding-bottom: 24px;
  overscroll-behavior: contain;
}


/* ---------------------------------------------------------
   4) Flex/overflow safety: allow any children to shrink
   (Prevents Plotly / long text from forcing extra width)
   --------------------------------------------------------- */
.irrigation-recommendation-page *,
.irrigation-recommendation-header *,
.irrigation-recommendation-plant-units-body * {
  min-width: 0;
  box-sizing: border-box;
}


/* ---------------------------------------------------------
   5) Plotly clamps (Plotly can sometimes overflow containers)
   --------------------------------------------------------- */
.irrigation-recommendation-page .js-plotly-plot,
.irrigation-recommendation-page .plot-container {
  max-width: 100%;
  overflow: hidden;
}


.irrigation-recommendation-plant-unit-card-header {
    /* padding: 8px 12px; */
    background-color: #689cbe;
    border-bottom: 1px solid #c4c8cc;
    font-size: 1.1rem;
    font-weight: 600;
    gap: 5px;
}

.irrigation-recommendation-day-card-header{
    /* padding: 8px 12px; */
    background-color: #a4bbdb;
    border-bottom: 1px solid #c4c8cc;
    font-size: 1.1rem;
    font-weight: 600;
    gap: 5px;
}

.irrigation-recommendation-day-card-footer{
    /* padding: 8px 12px; */
    background-color: #d8f3ed;
    border-top: 1px solid #c4c8cc;
    font-size: 1.1rem;
    font-weight: 600;
    gap: 5px;
}



