/* Employee app frame (templates/app/layout.php): menu rail, header, phone bottom bar and the "More"
   sheet. Colours, font and corners are CSS variables set from wp-admin → Appearance
   (src/Settings/Appearance.php::cssVars()); the values below are the built-in look. Loaded after
   workforce-one.css, so frame rules are scoped to .wfo-app to win over the older ones.
   assets/css/app-shell-rtl.css is generated with rtlcss (assets/css/README.md). */

.ews-app.wfo-app{
    --wfo-hero:linear-gradient(135deg,#13235B 0%,#37319A 55%,#5B3FD9 100%);--wfo-hero-start:#13235B;--wfo-hero-mid:#37319A;
    --wfo-hl:#FFC83D;--wfo-hl-ink:#13235B;--wfo-pri:#5B3FD9;--wfo-pri-dark:#4B34B2;--wfo-pri-soft:#EBE8FA;
    --wfo-font:'Alexandria',system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif;
    --wfo-r-card:20px;--wfo-r-ctl:14px;--wfo-r-sm:12px;
    --wfo-bg:#F3F4FA;--wfo-surface:#FFFFFF;--wfo-ink:#141A33;--wfo-muted:#6A7090;--wfo-line:#E8E9F2;
    --wfo-shadow:0 8px 24px rgba(19,35,91,.08);
    --bg:var(--wfo-bg);
    font-family:var(--wfo-font);color:var(--wfo-ink);background:var(--wfo-bg);border-radius:var(--wfo-r-card);
    /* block themes cap page content at their content width (~645px); the app needs the room */
    max-width:min(1440px,100%);margin-inline:auto;box-sizing:border-box
}
.wfo-app .screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.wfo-app .wfo-icon{flex:0 0 auto;display:block}
.wfo-app button,.wfo-app input,.wfo-app select,.wfo-app textarea{font-family:inherit}

/* ---------------------------------------------------------------- desktop: rail + main */
.wfo-shell{display:grid;grid-template-columns:96px minmax(0,1fr);min-height:650px}
.wfo-rail{background:var(--wfo-hero-start);padding:18px 10px;display:flex;flex-direction:column;gap:6px;border-start-start-radius:var(--wfo-r-card);border-end-start-radius:var(--wfo-r-card)}
.wfo-rail-brand{width:52px;height:52px;margin:0 auto 12px;border-radius:16px;background:var(--wfo-hl);color:var(--wfo-hl-ink);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:16px;text-decoration:none;overflow:hidden;flex:0 0 auto}
.wfo-rail-brand img{width:100%;height:100%;object-fit:contain;background:#fff}
.wfo-app .wfo-rail .ews-nav{display:flex;flex-direction:column;gap:4px}
.wfo-app .wfo-rail .ews-nav a,.wfo-app .wfo-rail-logout{display:flex;flex-direction:column;align-items:center;gap:5px;margin:0;padding:10px 4px;border-radius:14px;color:rgba(255,255,255,.68);background:transparent;text-decoration:none;font-size:11px;font-weight:500;line-height:1.25;text-align:center}
.wfo-app .wfo-rail .ews-nav a:hover,.wfo-app .wfo-rail-logout:hover{background:rgba(255,255,255,.08);color:#fff}
.wfo-app .wfo-rail .ews-nav a.active{background:rgba(255,255,255,.14);color:#fff;font-weight:700}
.wfo-app .wfo-rail .ews-nav a:focus-visible,.wfo-app .wfo-rail-logout:focus-visible,.wfo-rail-brand:focus-visible{outline:2px solid var(--wfo-hl);outline-offset:2px}
.wfo-rail-logout{margin-top:auto!important}
.wfo-rail-label{display:block;max-width:100%;overflow-wrap:anywhere}

.ews-app.wfo-app .ews-main{padding:22px 28px 32px;background:transparent;min-width:0}
.wfo-content{min-width:0}

/* header */
.wfo-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 20px;padding:22px 26px;border-radius:var(--wfo-r-card);background:var(--wfo-hero);color:#fff}
.wfo-header-text{min-width:0}
.wfo-header-brand{font-size:12px;color:rgba(255,255,255,.72);font-weight:500}
.wfo-app .wfo-header .ews-title{margin:2px 0 0;color:#fff;font-size:26px;font-weight:700;line-height:1.25}
.wfo-app .wfo-header .ews-sub{margin-top:4px;color:rgba(255,255,255,.72);font-size:13px}
.wfo-app .wfo-header .ews-mobile-top-actions{display:flex;align-items:center;gap:10px}
.wfo-app .wfo-header .ews-notification-bell{width:46px!important;height:46px!important;border-radius:14px;border:1px solid rgba(255,255,255,.2)!important;background:rgba(255,255,255,.12)!important;color:#fff!important;box-shadow:none!important}
.wfo-app .wfo-header .ews-notification-bell:hover{background:rgba(255,255,255,.2)!important}
.wfo-app .wfo-header .ews-notification-bell .ews-bell-count{background:var(--wfo-hl)!important;color:var(--wfo-hl-ink)!important;border-color:var(--wfo-hero-start)!important}
.wfo-app .wfo-header .ews-notification-dropdown{color:var(--wfo-ink)}
.wfo-app .wfo-header .ews-profile-menu-trigger{width:46px;height:46px;padding:0;border-radius:999px;border:2px solid rgba(255,255,255,.7);background:#fff;color:var(--wfo-hero-start);overflow:hidden;box-shadow:none;font-size:13px;font-weight:700}
.wfo-app .wfo-header .ews-profile-menu-avatar{width:100%;height:100%;object-fit:cover;border-radius:999px}
.wfo-app .wfo-header .ews-profile-menu-trigger:focus-visible,.wfo-app .wfo-header .ews-notification-bell:focus-visible{outline:2px solid var(--wfo-hl);outline-offset:2px}
.wfo-app .ews-profile-menu-dropdown{top:54px;border-radius:var(--wfo-r-ctl);border-color:var(--wfo-line);color:var(--wfo-ink)}
.wfo-app .ews-profile-menu-dropdown a{color:var(--wfo-ink)}
.wfo-app .ews-profile-menu-dropdown a:hover{background:var(--wfo-pri-soft);color:var(--wfo-pri)}
.wfo-app .ews-profile-menu-item-icon{display:inline-flex;color:var(--wfo-muted)}

/* the app's buttons follow the theme */
.wfo-app .ews-btn:not(.secondary):not(.danger){background:var(--wfo-pri)}
.wfo-app .ews-btn:not(.secondary):not(.danger):hover{background:var(--wfo-pri-dark)}

/* ---------------------------------------------------------------- phone bottom bar (hidden on desktop) */
.wfo-tabbar{display:none}
.wfo-tab{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:3px;min-height:52px;padding:0;border:0;background:none;color:var(--wfo-muted);font-size:11px;font-weight:500;line-height:1.2;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.wfo-tab-icon{position:relative;width:56px;height:32px;border-radius:999px;display:flex;align-items:center;justify-content:center}
.wfo-tab-label{max-width:100%;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-align:center;overflow-wrap:anywhere}
.wfo-tab.active{color:var(--wfo-pri);font-weight:700}
.wfo-tab.active .wfo-tab-icon{background:var(--wfo-pri-soft)}
.wfo-tab:focus-visible{outline:2px solid var(--wfo-pri);outline-offset:2px;border-radius:12px}
.wfo-tab-clock{color:var(--wfo-ink);font-weight:600}
.wfo-tab-clock-btn{position:relative;width:60px;height:60px;margin-top:-30px;border-radius:999px;background:var(--wfo-hero);color:#fff;border:4px solid var(--wfo-surface);box-sizing:border-box;display:flex;align-items:center;justify-content:center;box-shadow:0 10px 22px rgba(19,35,91,.28)}
.wfo-tab-clock.active{color:var(--wfo-pri)}
.wfo-tab-clock.active .wfo-tab-clock-btn{box-shadow:0 0 0 3px var(--wfo-hl),0 10px 22px rgba(19,35,91,.28)}
.wfo-clock-dot{position:absolute;top:2px;inset-inline-end:2px;width:12px;height:12px;border-radius:999px;border:2px solid var(--wfo-surface);box-sizing:border-box}
.wfo-clock-dot.is-in{background:#22C55E}.wfo-clock-dot.is-out{background:#F5A524}.wfo-clock-dot.is-done{background:#9097B5}

/* ---------------------------------------------------------------- "More" sheet (phones) */
.wfo-more{position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;margin:0;padding:0;border:0;background:transparent;color:var(--wfo-ink);font-family:var(--wfo-font)}
.wfo-more[open]{display:flex;align-items:flex-end}
.wfo-more::backdrop{background:rgba(11,14,31,.5)}
.wfo-more-sheet{width:100%;max-height:86vh;overflow:auto;box-sizing:border-box;background:var(--wfo-surface);border-radius:28px 28px 0 0;padding:10px 18px calc(22px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:16px;animation:wfo-sheet-up .22s ease-out}
@keyframes wfo-sheet-up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
/* Appearance → Full-screen app page (templates/app/page-fullscreen.php): the app fills the window */
body.wfo-fullscreen{margin:0;background:#F3F4FA;min-height:100vh}
.wfo-fullscreen-main{margin:0;padding:0}
body.wfo-fullscreen .ews-app.wfo-app{max-width:none;margin:0;border-radius:0;min-height:100vh}

/* status chips (icon + word, never colour alone): Home, Schedule */
.wfo-chip{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 11px;font-size:12px;font-weight:600;white-space:nowrap;background:#EEF0F5;color:#3B4466}
.wfo-chip.is-office{background:#E6F7EF;color:#0F6B43}
.wfo-chip.is-wfh{background:#E7EEFF;color:#1F4FB8}
.wfo-chip.is-leave{background:#F1EAFF;color:#5B34B5}
.wfo-chip.is-away{background:#FFF2DE;color:#8A4F00}
.wfo-chip.is-absent{background:#FFE8EC;color:#A51D3E}
.wfo-chip.is-off,.wfo-chip.is-none{background:#EEF0F5;color:#3B4466}

/* "My week" strip: seven days with icon + word (Schedule, My Profile) */
.wfo-myweek-days{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.wfo-myweek-days li{min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 4px 12px;border-radius:var(--wfo-r-ctl);background:#EEF0F5;color:#3B4466;text-align:center}
.wfo-myweek-days li.is-office{background:#E6F7EF;color:#0F6B43}
.wfo-myweek-days li.is-wfh{background:#E7EEFF;color:#1F4FB8}
.wfo-myweek-days li.is-leave{background:#F1EAFF;color:#5B34B5}
.wfo-myweek-days li.is-away{background:#FFF2DE;color:#8A4F00}
.wfo-myweek-days li.is-absent{background:#FFE8EC;color:#A51D3E}
.wfo-myweek-days li.is-today{box-shadow:inset 0 0 0 2px var(--wfo-pri)}
.wfo-myweek-day{font-size:12px;font-weight:600;opacity:.85}
.wfo-myweek-num{font-size:20px;font-weight:700;line-height:1.1;color:var(--wfo-ink)}
.wfo-myweek-icon{display:flex}
.wfo-myweek-word{font-size:11px;font-weight:600;line-height:1.25;max-width:100%;overflow-wrap:anywhere}
@media (max-width:820px){
    .wfo-myweek-days{gap:5px}
    .wfo-myweek-days li{padding:8px 2px 10px}
    .wfo-myweek-num{font-size:17px}
    .wfo-myweek-word{font-size:10px}
}
@media (max-width:420px){
    .wfo-myweek-word{font-size:9px;letter-spacing:-.2px}
}

@media (prefers-reduced-motion:reduce){.wfo-more-sheet{animation:none}}
.wfo-more-handle{width:40px;height:5px;border-radius:999px;background:var(--wfo-line);align-self:center}
.wfo-more-head{display:flex;align-items:center;gap:8px}
.wfo-more-me{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:18px;background:var(--wfo-bg);color:var(--wfo-ink);text-decoration:none}
.wfo-more-me img,.wfo-more-initials{width:48px;height:48px;border-radius:999px;flex:0 0 auto;object-fit:cover;background:#fff}
.wfo-more-initials{display:flex;align-items:center;justify-content:center;background:var(--wfo-pri-soft);color:var(--wfo-pri);font-weight:700}
.wfo-more-me-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;line-height:1.35}
.wfo-more-me-text strong{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wfo-more-me-text small{font-size:12px;color:var(--wfo-pri);font-weight:600}
.wfo-more-me>.wfo-icon{color:var(--wfo-muted)}
.wfo-more-close{width:44px;height:44px;flex:0 0 auto;border-radius:14px;border:1px solid var(--wfo-line);background:var(--wfo-surface);color:var(--wfo-ink);display:flex;align-items:center;justify-content:center;cursor:pointer}
.wfo-more-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 8px}
.wfo-more-item{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--wfo-ink);text-decoration:none;font-size:12px;text-align:center;line-height:1.25}
.wfo-more-icon{width:54px;height:54px;border-radius:var(--wfo-r-sm);background:var(--wfo-pri-soft);color:var(--wfo-pri);display:flex;align-items:center;justify-content:center}
.wfo-more-item.active{font-weight:700;color:var(--wfo-pri)}
.wfo-more-item.active .wfo-more-icon{background:var(--wfo-pri);color:#fff}
.wfo-more-rows{display:flex;flex-direction:column;border-top:1px solid var(--wfo-line)}
.wfo-more-row{display:flex;align-items:center;gap:12px;min-height:48px;padding:8px 2px;color:var(--wfo-ink);text-decoration:none;font-size:14px;border-bottom:1px solid var(--wfo-line)}
.wfo-more-row:last-child{border-bottom:0}
.wfo-more-row>.wfo-icon{color:var(--wfo-muted)}
.wfo-more-install{font-size:12px;color:var(--wfo-muted);line-height:1.5}
.wfo-more-logout,.wfo-more-logout>.wfo-icon{color:#C2264B;font-weight:600}
.wfo-more-item:focus-visible,.wfo-more-row:focus-visible,.wfo-more-me:focus-visible,.wfo-more-close:focus-visible{outline:2px solid var(--wfo-pri);outline-offset:2px}
@media (display-mode:standalone){.wfo-more-install{display:none}}

/* arrows point the reading way */
[dir=rtl] .wfo-more-me>.wfo-icon,[dir=rtl] .wfo-rail-logout .wfo-icon,[dir=rtl] .wfo-more-logout .wfo-icon,[dir=rtl] .ews-profile-menu-dropdown a:last-child .wfo-icon{transform:scaleX(-1)}

/* ---------------------------------------------------------------- phones */
@media (max-width:820px){
    .ews-app.wfo-app{border-radius:0;min-height:100vh;overflow:visible}
    .wfo-shell{display:block;min-height:0}
    .wfo-rail{display:none}
    .ews-app.wfo-app .ews-main{padding:0 0 calc(104px + env(safe-area-inset-bottom))!important;width:100%!important}
    .wfo-header{border-radius:0 0 26px 26px;padding:16px 16px 22px;margin:0 0 16px;align-items:flex-start}
    .wfo-app .wfo-header .ews-title{font-size:21px}
    .wfo-app .wfo-header .ews-sub{display:none}
    .wfo-app .wfo-header .ews-notification-bell,.wfo-app .wfo-header .ews-profile-menu-trigger{width:44px!important;height:44px!important}
    .wfo-content{padding:0 14px}
    .wfo-tabbar{position:fixed;z-index:9990;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:end;background:var(--wfo-surface);border-radius:24px 24px 0 0;box-shadow:0 -8px 24px rgba(19,35,91,.08);padding:8px 6px calc(14px + env(safe-area-inset-bottom))}
}

/* ---------------------------------------------------------------- print: the page only */
@media print{
    .wfo-rail,.wfo-tabbar,.wfo-more,.wfo-header{display:none!important}
    .wfo-shell{display:block!important}
    .ews-app.wfo-app{background:#fff!important}
}

/* Phones: no accidental zoom. iPhones zoom into any field whose text is under 16px when it is
   tapped, so fields are 16px there; double-tap does not zoom (and taps answer at once). Pinch-zoom
   stays unless wp-admin → Appearance → "Stop pinch-zoom on phones" is on (page-fullscreen.php). */
.wfo-app,body.wfo-fullscreen{touch-action:manipulation}
@media (max-width:820px){
    .wfo-app input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),.wfo-app select,.wfo-app textarea,
    body.wfo-fullscreen input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),body.wfo-fullscreen select,body.wfo-fullscreen textarea{font-size:16px!important}
}

/* Page links under a long people list (templates/app/list-pager.php, 3.31.71). */
.wfo-app .wfo-list-pager{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin:14px 0 4px;color:var(--wfo-muted);font-size:13px}
.wfo-app .wfo-list-pager-count{margin-right:auto;font-weight:600}
.wfo-app .wfo-list-pager-page{font-variant-numeric:tabular-nums}
.wfo-app .wfo-list-search{flex:1 1 220px;min-width:0;display:flex;margin:0}
.wfo-app .wfo-list-search .wfo-sched-search{flex:1 1 auto}

/* A photo opened over the page (data-wfo-photo links, assets/js/workforce-one.js). */
.wfo-photo-view{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:56px 16px 16px;background:rgba(10,14,32,.88)}
.wfo-photo-view img{max-width:100%;max-height:100%;border-radius:12px;opacity:0;transition:opacity .15s}
.wfo-photo-view.is-ready img{opacity:1}
.wfo-photo-view.is-ready .wfo-photo-wait{display:none}
.wfo-photo-wait{position:absolute;width:36px;height:36px;border-radius:50%;border:3px solid rgba(255,255,255,.25);border-top-color:#fff;animation:wfo-photo-spin .8s linear infinite}
@keyframes wfo-photo-spin{to{transform:rotate(360deg)}}
.wfo-photo-x{position:absolute;top:12px;inset-inline-end:12px;width:40px;height:40px;border:0;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;font-size:26px;line-height:1;cursor:pointer}
/* While a sheet, a list or the More menu is open, the page behind it does not move (owner, 2026-11-30): it cannot scroll, and a
   scroll that reaches the end of the sheet stops there instead of carrying on to the page. */
html:has(dialog[open]),html:has(dialog[open]) body{overflow:hidden}
dialog,.wfo-more-sheet,.wfo-sheet-body{overscroll-behavior:contain}
