/* 2.23: full-width responsive shell, sticky attendance and corrected email files. */
body.wlcrm-page #glt-translate-trigger,body.wlcrm-page #glt-toolbar,body.wlcrm-page #glt-footer,body.wlcrm-page #flags,body.wlcrm-page #moderncart-floating-cart{display:none!important}
body.wlcrm-page :is(#page,#content,.site-content,.content-area,.entry-content,.container,.e-con-inner,.elementor-widget-container){width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
body.wlcrm-page :is(#content,.site-content,.content-area,.entry-content){padding:0!important}
body #wlcrm-app.wlcrm-app{width:calc(100% - 12px)!important;max-width:none!important;margin:2px 6px 18px!important;overflow:visible!important;border-radius:12px!important}

/* Attendance header remains available while long CRM tables are scrolled. */
body .wlcrm-app .wlcrm-header{position:sticky!important;top:var(--wp-admin--admin-bar--height,0px)!important;z-index:10010!important;column-gap:22px!important;background:rgba(255,255,255,.97)!important;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:0 5px 18px rgba(24,51,82,.075)!important}
@media(min-width:1200px){body .wlcrm-app .wlcrm-header{grid-template-columns:250px minmax(705px,1fr) 164px!important}}

/* Large screens: title, four totals, employee, phone alert and Refresh in one row. */
body .wlcrm-app .wlcrm-push-panel{display:flex!important}
@media(min-width:1260px){
  body .wlcrm-app .wlcrm-followup-head{grid-template-columns:210px minmax(460px,1fr) minmax(190px,230px) minmax(230px,270px) 82px!important;align-items:center!important;gap:8px!important}
  body .wlcrm-app .wlcrm-followup-head>div:first-child{grid-column:1!important;grid-row:1!important}
  body .wlcrm-app .wlcrm-followup-stats{grid-column:2!important;grid-row:1!important}
  body .wlcrm-app .wlcrm-followup-head>label{grid-column:3!important;grid-row:1!important}
  body .wlcrm-app .wlcrm-followup-tools{display:contents!important}
  body .wlcrm-app .wlcrm-followup-head .wlcrm-push-panel{grid-column:4!important;grid-row:1!important;width:100%!important;min-width:0!important;max-width:none!important;height:36px!important;padding:3px 5px 3px 8px!important;flex-wrap:nowrap!important}
  body .wlcrm-app .wlcrm-followup-tools>#wlcrm-followup-refresh{grid-column:5!important;grid-row:1!important;width:82px!important;min-width:82px!important;height:36px!important;margin:0!important}
}
@media(min-width:768px) and (max-width:1259px){
  body .wlcrm-app .wlcrm-followup-head{grid-template-columns:minmax(180px,.65fr) minmax(430px,1.35fr)!important}
  body .wlcrm-app .wlcrm-followup-head>div:first-child{grid-column:1!important;grid-row:1!important}
  body .wlcrm-app .wlcrm-followup-stats{grid-column:2!important;grid-row:1!important}
  body .wlcrm-app .wlcrm-followup-head>label{grid-column:1!important;grid-row:2!important}
  body .wlcrm-app .wlcrm-followup-tools{grid-column:2!important;grid-row:2!important;display:flex!important;justify-content:flex-end!important;flex-wrap:nowrap!important;border-top:0!important;padding-top:0!important}
  body .wlcrm-app .wlcrm-followup-head .wlcrm-push-panel{flex:1 1 auto!important;min-width:220px!important;height:36px!important;flex-wrap:nowrap!important}
  body .wlcrm-app .wlcrm-followup-tools>#wlcrm-followup-refresh{order:2!important;min-width:82px!important;height:36px!important}
}
@media(max-width:767px){
  body #wlcrm-app.wlcrm-app{width:100%!important;margin:0!important;border-radius:0!important}
  body .wlcrm-app .wlcrm-header{top:0!important;column-gap:9px!important}
  body .wlcrm-app .wlcrm-followup-tools{display:flex!important;flex-direction:column!important;align-items:stretch!important}
  body .wlcrm-app .wlcrm-followup-head .wlcrm-push-panel{width:100%!important;max-width:none!important;min-width:0!important}
  body .wlcrm-app .wlcrm-followup-tools>#wlcrm-followup-refresh{order:2!important;align-self:flex-end!important}
}

/* Email attachments occupy the complete email card and never exceed it. */
body .wlcrm-app .wlcrm-email-attachments{grid-column:1/-1!important;width:100%!important;max-width:100%!important;grid-template-columns:minmax(120px,.75fr) repeat(3,minmax(0,1fr))!important;align-items:stretch!important;box-sizing:border-box!important;overflow:hidden!important}
body .wlcrm-app .wlcrm-email-attachments>div,body .wlcrm-app .wlcrm-email-attachments>label{min-width:0!important;max-width:100%!important;box-sizing:border-box!important;overflow:hidden!important}
body .wlcrm-app .wlcrm-email-attachments input[type="file"]{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;overflow:hidden!important;color:#617187!important}
body .wlcrm-app .wlcrm-email-attachments input[type="file"]::file-selector-button{max-width:105px!important;margin-right:6px!important;padding:5px 7px!important;border:1px solid #cbd8e8!important;border-radius:6px!important;background:#f7f9fc!important;color:#294761!important;font:inherit!important}
@media(max-width:1050px){body .wlcrm-app .wlcrm-email-attachments{grid-template-columns:repeat(3,minmax(0,1fr))!important}body .wlcrm-app .wlcrm-email-attachments>div{grid-column:1/-1!important}}
@media(max-width:650px){body .wlcrm-app .wlcrm-email-attachments{grid-template-columns:1fr!important}body .wlcrm-app .wlcrm-email-attachments>div{grid-column:auto!important}}
