/*
 GreenEco Meetings — Attendance toolbar final reference layout
 Screen: تحضير الموظفين
 Purpose:
 - same visual organization requested: two horizontal rows
 - row 1: six current action buttons, equal width
 - row 2: four current secondary tools, equal width
 - no side columns, no stretching, no hover shake
 - functions remain unchanged
 Version: 3.3.16.44.2.514
*/

@media screen {
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar{
    position:static!important;
    inset:auto!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    height:auto!important;
    min-height:0!important;
    max-height:none!important;

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

    overflow:visible!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;

    transform:none!important;
    box-sizing:border-box!important;
  }

  /* Parent is only a wrapper for two horizontal rows. */
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar > .toolbar,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar > .toolbar{
    position:static!important;

    display:flex!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    justify-content:flex-start!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    height:auto!important;
    min-height:0!important;
    max-height:none!important;

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

    border:1px solid #87979d!important;
    border-radius:0!important;
    background:#edf3f5!important;
    box-shadow:none!important;

    overflow:visible!important;
    transform:none!important;
    box-sizing:border-box!important;
  }

  /* Row 1: the six existing CRUD/search/refresh/print commands. */
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar > .toolbar > .toolbar-actions,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar > .toolbar > .toolbar-actions{
    position:static!important;

    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    grid-auto-flow:column!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    height:auto!important;
    min-height:38px!important;

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

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

    overflow:visible!important;
    transform:none!important;
    box-sizing:border-box!important;
  }

  /* Row 2: branch / administration / instant search / result count. */
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar > .toolbar > .toolbar-extra,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar > .toolbar > .toolbar-extra{
    position:static!important;

    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    grid-auto-flow:column!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    height:auto!important;
    min-height:38px!important;

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

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

    overflow:visible!important;
    transform:none!important;
    box-sizing:border-box!important;
  }

  /* Every cell has identical geometry. */
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar .toolbar-actions > *,
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar .toolbar-extra > *,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar .toolbar-actions > *,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar .toolbar-extra > *{
    position:static!important;

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

    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;

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

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

    border:1px solid #89989e!important;
    border-radius:0!important;
    background:#fff!important;
    color:#17333e!important;
    box-shadow:none!important;

    text-align:center!important;
    white-space:nowrap!important;
    overflow:hidden!important;

    font-size:10px!important;
    font-weight:700!important;
    line-height:1.15!important;

    transform:none!important;
    translate:none!important;
    scale:none!important;
    filter:none!important;

    box-sizing:border-box!important;
  }

  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar svg,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar svg{
    flex:0 0 auto!important;
  }

  /* Search remains one equal cell, not a stretched side column. */
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar .attendance-toolbar-search,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar .attendance-toolbar-search{
    grid-column:auto!important;
    justify-content:flex-start!important;
    padding:3px 7px!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar .attendance-toolbar-search input,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar .attendance-toolbar-search input{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;

    height:28px!important;
    min-height:28px!important;
    max-height:28px!important;

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

    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;

    font-size:10px!important;
    line-height:1.1!important;

    transform:none!important;
    box-sizing:border-box!important;
  }

  /* Result count occupies the fourth equal cell. */
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar .entity-toolbar-results,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar .entity-toolbar-results{
    flex-direction:row!important;
    justify-content:center!important;
    gap:4px!important;
    background:#fff!important;
  }

  /* Disabled buttons keep the same size. */
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar button:disabled,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar button:disabled{
    opacity:.48!important;
    cursor:not-allowed!important;
  }

  /* Hover/focus/press never changes position or size. */
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar button:hover:not(:disabled),
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar button:focus-visible,
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar button:active,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar button:hover:not(:disabled),
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar button:focus-visible,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar button:active{
    width:100%!important;
    min-width:0!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;

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

    transform:none!important;
    translate:none!important;
    scale:none!important;

    box-shadow:none!important;
    filter:none!important;
    outline:none!important;

    background:#eaf8f9!important;
    border-color:#5e9ca7!important;
  }
}

/* Keep the two rows intact on normal desktop widths; scroll only on narrow windows. */
@media screen and (max-width:980px){
  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar{
    overflow-x:auto!important;
    overflow-y:visible!important;
  }

  html.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar > .toolbar,
  body.greeneco-meetings-route
  .page-container:has(> .meeting-attendance-page-head)
  .attendance-one-row-toolbar > .toolbar{
    min-width:900px!important;
  }
}
