/* Mobile drawer only. All links continue to come from the permitted navigation. */
@media (max-width:800px) {
  #wp-mobile-ui #wp-mobile-drawer {
    position:fixed!important;inset:0 auto 0 0!important;
    width:min(80vw,360px)!important;max-width:calc(100vw - 48px)!important;
    height:100vh!important;height:100dvh!important;
    padding:0 0 env(safe-area-inset-bottom)!important;
    background:#fff!important;color:#24292b!important;
    border:0!important;border-radius:0!important;box-shadow:8px 0 30px #0003!important;
    overflow-y:auto!important;overscroll-behavior:contain;scrollbar-width:thin;
    direction:ltr!important;transform:none!important;z-index:1203!important;
  }
  #wp-mobile-ui .drawer-profile {
    display:flex;align-items:center;gap:16px;min-height:152px;box-sizing:border-box;
    padding:calc(30px + env(safe-area-inset-top)) 22px 24px;
    background:#7dbb19;color:white;
  }
  #wp-mobile-ui .drawer-avatar {
    display:grid;place-items:center;flex:0 0 64px;height:72px;
    background:#fff3;border:1px solid #ffffff70;border-radius:8px;
    color:white;font:500 36px/1 Arial,sans-serif;
  }
  #wp-mobile-ui .drawer-identity {min-width:0;flex:1;text-align:start;}
  #wp-mobile-ui .drawer-name,#wp-mobile-ui .drawer-account,#wp-mobile-ui .drawer-account-back {border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;margin:0!important;border-radius:0!important;text-align:start!important;width:auto!important;}
  #wp-mobile-ui .drawer-name {min-height:44px!important;cursor:pointer;}
  #wp-mobile-ui .drawer-account-back {color:white!important;min-height:44px!important;font-size:14px!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-identity {display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:3px!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-name {display:block!important;color:#fff!important;font:500 22px/1.5 Arial,Tahoma,sans-serif!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-account-back,#wp-mobile-ui #wp-mobile-drawer .drawer-account {display:block!important;color:#fff!important;font:400 14px/1.6 Tahoma,Arial,sans-serif!important;}
  #wp-mobile-ui .drawer-name {display:block;color:#fff;font-size:20px;font-weight:500;line-height:1.5;overflow-wrap:anywhere;}
  #wp-mobile-ui .drawer-account {display:inline-block;color:#fff!important;font-size:13px!important;text-decoration:none!important;line-height:1.6;min-height:44px;padding:8px 0!important;box-sizing:border-box;}
  #wp-mobile-ui .drawer-close {
    position:absolute;top:max(4px,env(safe-area-inset-top));right:4px;
    display:grid!important;place-items:center;width:40px!important;height:40px!important;min-height:0!important;
    padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;
    background:transparent!important;box-shadow:none!important;color:#fff!important;font:28px/1 Arial!important;
  }
  #wp-mobile-ui .drawer-links {display:block!important;padding:10px 0!important;margin:0!important;background:#fff!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-link {
    display:flex!important;align-items:center!important;gap:18px!important;width:100%!important;box-sizing:border-box!important;
    min-height:56px!important;padding:13px 20px!important;margin:0!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
    background:#fff!important;color:#24292b!important;direction:ltr!important;
    font-family:Arial,Tahoma,sans-serif!important;font-size:16px!important;font-weight:400!important;
    line-height:1.6!important;text-decoration:none!important;text-align:start!important;transform:none!important;
  }
  #wp-mobile-ui #wp-mobile-drawer .drawer-label {flex:1;min-width:0;overflow-wrap:anywhere;font-family:Tahoma,Arial,sans-serif!important;font-size:16px!important;line-height:1.6!important;}
  #wp-mobile-ui .drawer-icon {display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:28px;color:#15a4c4;}
  #wp-mobile-ui .drawer-icon svg {display:block;width:28px;height:28px;}
  #wp-mobile-ui .drawer-icon-networkMenu,#wp-mobile-ui .drawer-icon-adminMenu,#wp-mobile-ui .drawer-icon-reports {color:#ed993b;}
  #wp-mobile-ui .drawer-icon-logout {color:#ed4b94;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-link:hover {background:#f6f9f0!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-link.active {background:#f0f7e5!important;box-shadow:inset 3px 0 #7dbb19!important;color:#35620c!important;}
  #wp-mobile-ui .drawer-count {flex:0 0 auto;min-width:22px;padding:1px 5px;border-radius:20px;background:#edf5dd;color:#426712;font-size:12px;text-align:center;}
  #wp-mobile-ui .drawer-logout {display:block!important;padding:6px 0 12px!important;margin:0!important;border-top:1px solid #eef0eb;background:white!important;}
  body.wp-mobile-ready #wp-mobile-ui .mobile-nav-overlay {background:rgba(0,0,0,.53)!important;z-index:1200!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
  #wp-mobile-ui.mobile-nav-open > .mobile-nav-button {visibility:hidden!important;}
  #wp-mobile-ui #wp-mobile-drawer :focus-visible {outline:2px solid #315e11!important;outline-offset:-3px!important;}
  body.wp-mobile-open {overflow:hidden!important;}
  #wp-mobile-ui .mobile-user-trigger {display:flex!important;flex-direction:column;gap:4px;max-width:200px;border:0!important;background:transparent!important;box-shadow:none!important;color:#fff!important;padding:6px!important;margin:0!important;min-height:44px!important;text-align:start!important;}
  #wp-mobile-ui .mobile-user-trigger strong {font-size:16px!important;overflow-wrap:anywhere;}
  #wp-mobile-ui .mobile-user-trigger span {font-size:12px!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-account-panel {padding:12px 16px 18px;background:#fff;font-family:Tahoma,Arial,sans-serif;}
  #wp-mobile-ui #wp-mobile-drawer .account-section {margin:0 0 10px!important;border-bottom:1px solid #e7ecdf!important;}
  #wp-mobile-ui #wp-mobile-drawer .account-section summary {display:flex!important;align-items:center;justify-content:space-between;gap:8px;min-height:56px;padding:8px 0;font:500 16px/1.5 Tahoma,Arial,sans-serif;cursor:pointer;color:#29382a;}
  #wp-mobile-ui #wp-mobile-drawer .account-section:not([open])>form {display:none!important;}
  #wp-mobile-ui #wp-mobile-drawer .account-section form {display:grid;gap:14px;margin:0;padding:6px 0 18px;}
  #wp-mobile-ui #wp-mobile-drawer .account-section label {display:grid;gap:7px;font:400 14px/1.6 Tahoma,Arial,sans-serif;color:#334131;}
  #wp-mobile-ui #wp-mobile-drawer .account-section input {box-sizing:border-box;width:100%!important;min-width:0!important;min-height:46px;font:16px/1.4 Arial,sans-serif!important;padding:10px!important;background:white!important;color:#222!important;border:1px solid #ccd5c2!important;border-radius:7px!important;}
  #wp-mobile-ui #wp-mobile-drawer .account-section button[type=submit] {min-height:46px;background:#4a7813!important;color:white!important;border:0!important;border-radius:7px!important;box-shadow:none!important;font:500 14px/1.5 Tahoma,Arial,sans-serif!important;}
  #wp-mobile-ui #wp-mobile-drawer .account-message {background:#eff8e3;padding:10px;color:#315518;font-size:14px;}
  #wp-mobile-ui #wp-mobile-drawer .account-errors {color:#a02525;background:#fff1f1;padding:10px 24px 10px 10px;font-size:13px;line-height:1.6;}
  #wp-mobile-ui #wp-mobile-drawer [hidden] {display:none!important;}
  @media (prefers-reduced-motion:no-preference) {
    #wp-mobile-ui.mobile-nav-open #wp-mobile-drawer {animation:hl-drawer-enter .2s ease-out;}
    @keyframes hl-drawer-enter {from {transform:translateX(100%);}to {transform:translateX(0);}}
  }
}

/* Blue/green waves in the mobile application header only. */
@media (max-width:800px) {
  body.wp-mobile-ready #wp-mobile-ui .portal-header {
    isolation:isolate;overflow:hidden;
    background:linear-gradient(115deg,#155c80 0%,#087c85 52%,#11866c 100%)!important;
    border-bottom:3px solid #40a7a1!important;
  }
  body.wp-mobile-ready #wp-mobile-ui .portal-header::before {
    content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 130' preserveAspectRatio='none'%3E%3Cpath d='M0 65 C110 5 190 150 330 77 S510 17 600 48 V130 H0Z' fill='%236ed3bc' fill-opacity='.15'/%3E%3Cpath d='M0 108 C150 36 233 167 400 95 S530 42 600 71 V130 H0Z' fill='%2352c2d8' fill-opacity='.15'/%3E%3Cpath d='M0 0 H600 V20 C460 76 330 -28 180 21 S62 37 0 10Z' fill='%23092f5b' fill-opacity='.12'/%3E%3C/svg%3E");
    background-size:100% 100%;background-repeat:no-repeat;
  }
  body.wp-mobile-ready #wp-mobile-ui .portal-header>* {position:relative;z-index:1;}
  body.wp-mobile-ready #wp-mobile-ui .portal-user {max-width:100%!important;width:100%!important;}
  body.wp-mobile-ready #wp-mobile-ui .mobile-user-trigger {max-width:100%!important;width:100%!important;}
  body.wp-mobile-ready #wp-mobile-ui .mobile-nav-button {background:#126d98!important;border:1px solid #ffffff80!important;box-shadow:0 3px 10px #07334b30!important;}
}

@media (max-width:800px) {
  body.wp-mobile-ready #wp-mobile-ui .portal-header .mobile-header-home {display:block!important;min-height:44px!important;color:#fff!important;text-decoration:none!important;font:inherit!important;line-height:inherit!important;border-radius:5px;}
  body.wp-mobile-ready #wp-mobile-ui .portal-header .mobile-header-home span {display:block!important;margin-top:5px;font:400 12px/1.4 Tahoma,Arial,sans-serif!important;color:#fff!important;}
  body.wp-mobile-ready #wp-mobile-ui .portal-header .mobile-header-home:focus-visible {outline:2px solid white;outline-offset:4px;}
}

/* Approved mobile revision: right-hand grouped navigation and account styling. */
@media (max-width:800px) {
  #wp-mobile-ui #wp-mobile-drawer {inset:0 0 0 auto!important;direction:rtl!important;box-shadow:-8px 0 30px #0003!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-close {right:auto!important;left:4px!important;z-index:3!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-profile {position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(115deg,#155c80 0%,#087c85 52%,#11866c 100%)!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-profile::before {content:"";position:absolute;inset:0;pointer-events:none;z-index:0;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 130' preserveAspectRatio='none'%3E%3Cpath d='M0 65 C110 5 190 150 330 77 S510 17 600 48 V130 H0Z' fill='%236ed3bc' fill-opacity='.15'/%3E%3Cpath d='M0 108 C150 36 233 167 400 95 S530 42 600 71 V130 H0Z' fill='%2352c2d8' fill-opacity='.15'/%3E%3Cpath d='M0 0 H600 V20 C460 76 330 -28 180 21 S62 37 0 10Z' fill='%23092f5b' fill-opacity='.12'/%3E%3C/svg%3E");
    background-size:100% 100%;background-repeat:no-repeat;
  }
  #wp-mobile-ui #wp-mobile-drawer .drawer-profile>* {position:relative;z-index:1;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-link {direction:rtl!important;text-align:right!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-link.active {box-shadow:inset -3px 0 #178e8a!important;background:#e8f5f4!important;color:#125d68!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-group {margin:0!important;padding:0!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-group>summary {cursor:pointer;list-style:none!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-group>summary::-webkit-details-marker {display:none;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-group:not([open])>.drawer-children {display:none!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-group[open]>.drawer-children {display:block!important;border-right:2px solid #d5e9eb;margin:0 32px 8px 8px;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-children .drawer-link {padding:11px 12px!important;gap:12px!important;background:#f7fbfc!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-children .drawer-label {font-size:14px!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-children .drawer-icon {flex-basis:24px;width:24px;height:24px;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-chevron {margin-right:auto;font-size:20px;color:#548087;transition:transform .15s;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-group[open]>summary .drawer-chevron {transform:rotate(180deg);}
  #wp-mobile-ui #wp-mobile-drawer .account-section button[type=submit] {background:#126c80!important;}
  #wp-mobile-ui #wp-mobile-drawer .account-message {background:#e7f5f3;color:#155e67;}
  #wp-mobile-ui #wp-mobile-drawer :focus-visible {outline-color:#17858f!important;}
}

/* Compact mobile title, full display name, and drawer profile. */
@media (max-width:800px) {
  body.wp-mobile-ready #wp-mobile-ui .portal-header {
    grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important;
    height:auto!important;min-height:0!important;gap:0!important;
    padding:calc(4px + env(safe-area-inset-top)) 64px 4px 12px!important;
  }
  body.wp-mobile-ready #wp-mobile-ui .portal-header h1 {
    grid-column:1!important;grid-row:2!important;width:100%!important;min-width:0!important;
    font-size:clamp(18px,5vw,22px)!important;line-height:1.25!important;white-space:nowrap!important;
  }
  body.wp-mobile-ready #wp-mobile-ui .portal-header .mobile-header-home {
    display:flex!important;align-items:center;justify-content:center;direction:ltr;
  }
  body.wp-mobile-ready #wp-mobile-ui .portal-user {
    grid-column:1!important;grid-row:1!important;align-self:center!important;align-items:center!important;
  }
  body.wp-mobile-ready #wp-mobile-ui .mobile-user-trigger {
    align-items:flex-start!important;justify-content:center!important;padding:4px 0!important;text-align:left!important;
  }
  body.wp-mobile-ready #wp-mobile-ui .mobile-user-trigger strong {
    max-width:100%;font-size:16px!important;line-height:1.35!important;
    white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere;
  }
  body.wp-mobile-ready #wp-mobile-ui .mobile-nav-button {top:calc(16px + env(safe-area-inset-top))!important;}
  #wp-mobile-ui #wp-mobile-drawer .drawer-profile {
    min-height:72px!important;padding:calc(12px + env(safe-area-inset-top)) 20px 12px 52px!important;
  }
  #wp-mobile-ui #wp-mobile-drawer .drawer-name {
    min-height:0!important;font-size:20px!important;line-height:1.4!important;cursor:default;
  }
}

@media (max-width:800px) {
  body.wp-mobile-ready #wp-mobile-ui .portal-header {grid-template-rows:auto!important;min-height:72px!important;}
  body.wp-mobile-ready #wp-mobile-ui .portal-header h1 {grid-row:1!important;}
  #wp-mobile-ui #wp-mobile-drawer button.drawer-name {min-height:44px!important;cursor:pointer;}
}
