/* =========================================================
   AGRO INSIGHTS — page layout & professional toolbar
   Uses original component IDs, no callback changes needed.
   ========================================================= */


/* =========================================================
   1) GRAPHS STACK (page body under the toolbar)
   ========================================================= */

.agro-graphs-stack{
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  gap: 8px;
  min-height: 0;         /* IMPORTANT: allows children to shrink + scroll properly */
}

/* Each visible graph shares height equally */
.agro-graph-wrap{
  flex: 1 1 0;
  min-height: 0;         /* IMPORTANT so dcc.Graph can size correctly */

  background: #ffffff;
  border: 1px solid #e3e7ee;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

/* Make the Plotly graph fill its wrapper */
.agro-graph-wrap .js-plotly-plot,
.agro-graph-wrap .plotly,
.agro-graph-wrap .plot-container{
  height: 100% !important;
}

.agro-body{
  height: calc(100vh - 130px); /* adjust if your top bar height changes */
  min-height: 0;
  padding-top: 8px;
}


/* =========================================================
   2) TOP TOOLBAR — outer container
   ========================================================= */



.agro-toolbar{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  gap: 0.75rem;
}

.agro-toolbar-section{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Last section (Actions) pushes to the right edge */
.agro-toolbar-section:last-of-type{
  margin-left: auto;
}

.agro-toolbar-section-label{
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #000000;
  user-select: none;
  white-space: nowrap;
  padding-right: 0.25rem;
}

.agro-toolbar-divider{
  width: 1px;
  align-self: stretch;
  background: #c9d4e0;
  margin: 0 0.25rem;
}


/* =========================================================
   3) PILL WRAPPER — shared shell around groups of controls
   ========================================================= */

.agro-toolbar-pill{
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;

  background: #ffffff;
  border: 1px solid #c9d4e0;
  border-radius: 8px;
  padding: 0.25rem 0.75rem;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  min-height: 34px;
}


/* =========================================================
   4) SHOW CHECKLIST (Weather / Plant / Soil / Crop / Activities / All)
   ========================================================= */

.agro-show-checklist{
  display: inline-flex !important;
  align-items: center;
  gap: 0.9rem;        /* space between items in the list */
  flex-wrap: wrap;
}

.agro-show-checklist .form-check{
  margin: 0 !important;
  padding-left: 0 !important;     /* kill Bootstrap's default indent */
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;                    /* ← space between checkbox and its label */
}

.agro-show-checklist .form-check-input{
  cursor: pointer;
  margin: 0 !important;           /* remove Bootstrap's absolute positioning */
  position: static !important;
  float: none !important;
  flex: 0 0 auto;
}

.agro-show-checklist .form-check-input:checked{
  background-color: #27ae60;
  border-color: #27ae60;
}

.agro-show-checklist .form-check-label{
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2a37;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  margin: 0;
}


/* =========================================================
   5) OPTIONS SWITCHES (Forecast / Normalize / Alerts / Raw data)
   ========================================================= */

.agro-toolbar-switch-group{
  gap: 0.9rem !important;
}

.agro-toolbar-checklist{
  display: inline-flex !important;
  align-items: center;
}

.agro-toolbar-checklist .form-check{
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
}

.agro-toolbar-checklist .form-check-label{
  font-size: 0.85rem;
  font-weight: 500;
  color: #1f2a37;
  cursor: pointer;
  user-select: none;
  padding-left: 0.25rem;
  white-space: nowrap;
}

.agro-toolbar-checklist .form-check-input{
  cursor: pointer;
}

.agro-toolbar-checklist .form-check-input:checked{
  background-color: #177da5;
  border-color: #177da5;
}


/* =========================================================
   6) HOVER SECTION (its own pill, tighter padding)
   ========================================================= */

.agro-toolbar-hover-pill{
  padding: 0.15rem 0.4rem;        /* tighter than the option pills */
}

.agro-toolbar-hover-pill .agro-toolbar-dropdown{
  min-width: 150px;
}

.agro-toolbar-dropdown{
  font-size: 0.85rem;
}

.agro-toolbar-dropdown .Select-control{
  border-radius: 6px;
  border-color: #c9d4e0;
  min-height: 30px;
  background: transparent;
}

.agro-toolbar-dropdown .Select-control:hover{
  border-color: #177da5;
  box-shadow: 0 0 0 1px rgba(23, 125, 165, 0.15);
}

.agro-toolbar-dropdown .Select-placeholder,
.agro-toolbar-dropdown .Select-value{
  line-height: 30px;
  font-weight: 500;
}


/* =========================================================
   7) ACTION BUTTONS (Actions section)
   ========================================================= */

.agro-action-btn-group{
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}


/* =========================================================
   8) RESPONSIVE — narrow viewports
   ========================================================= */

@media (max-width: 1200px){
  .agro-toolbar{
    gap: 0.5rem;
  }
  .agro-toolbar-divider{
    display: none;
  }
  .agro-toolbar-section:last-of-type{
    margin-left: 0;
  }
}