/*
 GreenEco Meetings — Follow-up toolbar aligned with Preparation screen
 Screen: متابعة النتائج
 Layout:
   Row 1 = Meeting subject (3 columns) + Edit/Search/Refresh/Print (4 columns)
   Row 2 = 7 equal filter cells
 Printing and business logic are untouched.
 Version: 3.3.16.44.2.505
*/

@media screen {
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters){
    width:min(1120px,calc(100% - 20px))!important;
    max-width:1120px!important;
    min-width:0!important;

    margin:0 auto 7px!important;
    padding:5px!important;

    display:grid!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    grid-template-rows:36px 50px!important;
    gap:5px!important;

    align-items:stretch!important;
    justify-items:stretch!important;
    direction:rtl!important;

    border:1px solid #8f9da3!important;
    border-radius:0!important;
    background:#eef3f5!important;
    box-shadow:none!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }

  /* Let toolbar actions and the filter children become direct grid items. */
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions,
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-extra,
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-extra,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters{
    display:contents!important;
  }

  /* -------------------------------------------------------
     Row 1 — same visual rhythm as Preparation screen
     ------------------------------------------------------- */

  /* Subject occupies the first 3 cells on the right. */
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-meeting-filter,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-meeting-filter{
    grid-row:1!important;
    grid-column:1 / 4!important;

    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:36px!important;

    margin:0!important;
    padding:0 7px!important;

    display:grid!important;
    grid-template-columns:108px minmax(0,1fr)!important;
    align-items:center!important;
    gap:6px!important;

    border:1px solid #8b989e!important;
    border-radius:0!important;
    background:#fff!important;
    box-sizing:border-box!important;
  }

  html.greeneco-meetings-route
  .meeting-followup-meeting-filter > span,
  body.greeneco-meetings-route
  .meeting-followup-meeting-filter > span{
    display:flex!important;
    align-items:center!important;
    height:100%!important;
    font-size:10px!important;
    font-weight:800!important;
    white-space:nowrap!important;
  }

  html.greeneco-meetings-route
  .meeting-followup-meeting-filter select,
  body.greeneco-meetings-route
  .meeting-followup-meeting-filter select{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:28px!important;
    min-height:28px!important;
    margin:0!important;
    padding:2px 7px!important;
    border:1px solid #79a9b3!important;
    border-radius:0!important;
    background:#c7f0f4!important;
    box-sizing:border-box!important;
    font-size:10px!important;
  }

  /* Four commands fill the remaining four cells, one button per cell. */
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:36px!important;
    min-height:36px!important;

    margin:0!important;
    padding:5px 6px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;

    border:1px solid #8b989e!important;
    border-radius:0!important;
    background:#fff!important;
    color:#18323d!important;
    box-shadow:none!important;
    transform:none!important;

    white-space:nowrap!important;
    font-size:10px!important;
    font-weight:750!important;
    line-height:1.2!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button:nth-child(1),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button:nth-child(1){
    grid-row:1!important;
    grid-column:4!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button:nth-child(2),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button:nth-child(2){
    grid-row:1!important;
    grid-column:5!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button:nth-child(3),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button:nth-child(3){
    grid-row:1!important;
    grid-column:6!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button:nth-child(4),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button:nth-child(4){
    grid-row:1!important;
    grid-column:7!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button:hover:not(:disabled),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters)
  > .toolbar-actions > .tool-button:hover:not(:disabled){
    background:#e8f8f8!important;
    border-color:#5f9da8!important;
    transform:none!important;
    filter:none!important;
    box-shadow:none!important;
  }

  /* -------------------------------------------------------
     Row 2 — all 7 filter cells are exactly equal
     ------------------------------------------------------- */

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(2),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(2){
    grid-row:2!important; grid-column:1!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(3),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(3){
    grid-row:2!important; grid-column:2!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(4),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(4){
    grid-row:2!important; grid-column:3!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(5),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(5){
    grid-row:2!important; grid-column:4!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(6),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(6){
    grid-row:2!important; grid-column:5!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(7),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(7){
    grid-row:2!important; grid-column:6!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(8),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters > :nth-child(8){
    grid-row:2!important; grid-column:7!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters
  > label:not(.meeting-followup-meeting-filter),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters
  > label:not(.meeting-followup-meeting-filter){
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:50px!important;

    margin:0!important;
    padding:3px 5px!important;

    display:grid!important;
    grid-template-rows:14px 28px!important;
    align-items:center!important;
    gap:2px!important;

    border:1px solid #8b989e!important;
    border-radius:0!important;
    background:#fff!important;
    box-sizing:border-box!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters
  > label:not(.meeting-followup-meeting-filter) > span,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters
  > label:not(.meeting-followup-meeting-filter) > span{
    min-width:0!important;
    overflow:hidden!important;
    font-size:9px!important;
    line-height:14px!important;
    font-weight:750!important;
    text-align:center!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters select,
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters input[type="date"],
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters select,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-inline-filters input[type="date"]{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:28px!important;
    min-height:28px!important;

    margin:0!important;
    padding:2px 5px!important;

    border:1px solid #79a9b3!important;
    border-radius:0!important;
    background:#c7f0f4!important;
    font-size:9px!important;
    box-sizing:border-box!important;
  }

  /* Overdue checkbox styled as a normal filter cell. */
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-overdue-check,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-overdue-check{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:50px!important;

    margin:0!important;
    padding:4px 6px!important;

    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;

    border:1px solid #8b989e!important;
    border-radius:0!important;
    background:#fff!important;
    box-sizing:border-box!important;
  }

  /* Clear filters is the final equal cell. */
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-clear,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-clear{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:50px!important;
    min-height:50px!important;

    margin:0!important;
    padding:5px 7px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    border:1px solid #8b989e!important;
    border-radius:0!important;
    background:#fff!important;
    font-size:10px!important;
    font-weight:750!important;
    box-sizing:border-box!important;
  }

  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-clear:hover,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-clear:hover{
    background:#e8f8f8!important;
    border-color:#5f9da8!important;
    transform:none!important;
    box-shadow:none!important;
  }

  /* Keep the register centered under the toolbar, like Preparation. */
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-dashboard,
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-summaryline,
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-table,
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .table-footer,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-dashboard,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-summaryline,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  .meeting-followup-table,
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .table-footer{
    width:min(1120px,calc(100% - 20px))!important;
    max-width:1120px!important;
    margin-right:auto!important;
    margin-left:auto!important;
    box-sizing:border-box!important;
  }
}

@media screen and (max-width:980px){
  html.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters),
  body.greeneco-meetings-route
  .page-container:has(.meeting-followup-inline-filters)
  > .toolbar:has(.meeting-followup-inline-filters){
    width:calc(100% - 16px)!important;
    max-width:none!important;
    grid-template-columns:repeat(7,minmax(120px,1fr))!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
  }
}
