:root {
    --psl-z: 999999;
    --psl-overlay: rgba(0,0,0,.6);
    --psl-panel-bg: #fff;
    --psl-radius: 8px;
    --psl-shadow: 0 10px 30px rgba(0,0,0,.2);
    --psl-border: #e9e9e9;
    --psl-text: #111;
    --psl-muted: #666;
  }
  
  .psl-sr-only { 
    position:absolute; 
    left:-9999px; 
    top:auto; 
    width:1px; 
    height:1px; 
    overflow:hidden; 
  }
  
  .psl-search-overlay[hidden] { display:none !important; }
  .psl-search-overlay {
    position: fixed; 
    inset: 0; 
    background: var(--psl-overlay);
    display: grid; 
    place-items: start center; 
    padding: 20vh 16px; 
    z-index: var(--psl-z);
  }

  #mobile_menu2 a.psl-search-trigger {
    font-size: .74em !important;
    font-weight: bold;
  }

  #mopile_menu2 .psl-search-trigger::before {
    width: 18px; 
    height: 18px;  
  }
  
  .psl-search-panel {
    width: 720px; max-width: 100%;
    background: var(--psl-panel-bg);
    border-radius: var(--psl-radius);
    box-shadow: var(--psl-shadow);
    padding: 20px; position: relative;
  }
  
  .psl-close {
    position: absolute; 
    top: 6px; 
    right: 8px; 
    font-size: 24px; 
    line-height: 1; 
    background: none; 
    border: 0; 
    cursor: pointer;
  }
  
  .psl-search-form input[type="search"]{
    width: 100%;
    padding: 10px 40px 10px 40px;
    border: 1px solid var(--psl-border);
    border-radius: 8px;
    outline: none;
    position: relative;
  }

  .psl-input-wrap { position: relative; }
  .psl-input-wrap::before {
    content: ""; 
    position: absolute; 
    left: 14px; 
    top: 50%; 
    transform: translateY(-50%);
    width: 20px; 
    height: 20px; 
    background: currentColor; 
    opacity: .75;
    z-index: 1;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M15.5 14h-.79l-.28-.28A6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.22-1.57l.28.28v.79l4.99 5 1.41-1.41-5-4.99ZM9.5 14A4.5 4.5 0 1 1 14 9.5 4.505 4.505 0 0 1 9.5 14Z"/></svg>') center/contain no-repeat;
            mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M15.5 14h-.79l-.28-.28A6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.22-1.57l.28.28v.79l4.99 5 1.41-1.41-5-4.99ZM9.5 14A4.5 4.5 0 1 1 14 9.5 4.505 4.505 0 0 1 9.5 14Z"/></svg>') center/contain no-repeat;
  }

  .psl-input-wrap .psl-close {
    position: absolute; 
    right: 8px; 
    top: 50%; 
    transform: translateY(-50%);
    font-size: 20px; 
    line-height: 1; 
    width: 32px; 
    height: 32px;
  }
  
  .psl-suggestions { 
    margin-top: 12px;
    padding: 0 12px 0 0;
    display: grid; 
    gap: 8px; 
    max-height: 55vh; 
    overflow: auto; 
  }
  .psl-sugg { display:flex; align-items:center; gap:12px; padding:10px; border:1px solid var(--psl-border); border-radius:12px; text-decoration:none; color:var(--psl-text); }
  .psl-sugg:hover { background:#fafafa; }
  .psl-sugg-thumb { width:48px; height:48px; object-fit:cover; border-radius:8px; }
  .psl-sugg-title { 
    display:block; 
    font-weight:600;
    line-height: 1.5;
  }

  .psl-sugg-meta { 
    display:block; 
    font-size:14px; 
    color:var(--psl-muted); 
    margin-top:2px; 
    line-height: 1.5;
  }
  
  .psl-see-all { display:inline-block; margin-top:12px; text-decoration:none; }
  
  .psl-empty { padding:12px; color:var(--psl-muted); }

  /* Skeleton loader */
  .psl-skeletons { display: grid; gap: 8px; }
  .psl-skeleton {
    display:flex; align-items:center; gap:12px; padding:10px; border:1px solid var(--psl-border); border-radius:12px;
    overflow:hidden;
  }
  .psl-skel-thumb { width:48px; height:48px; border-radius:8px; background: #eee; position: relative; }
  .psl-skel-lines { flex:1; display:grid; gap:6px; }
  .psl-skel-line { height:12px; background:#eee; border-radius:6px; position:relative; overflow:hidden; }
  .psl-skel-line.short { width:40%; }
  .psl-skel-line.long  { width:80%; height:14px; }
  .psl-skeleton .shine::after,
  .psl-skel-thumb.shine::after,
  .psl-skel-line.shine::after {
    content:""; position:absolute; inset:0; transform: translateX(-100%);
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 100%);
    animation: psl-shimmer 1.2s infinite;
  }
  @keyframes psl-shimmer { 100% { transform: translateX(100%); } }
  
  /* Turn the "Search" item into an icon-only button */
  .et_pb_menu .menu-item.psl-search-menu-item > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: 0; /* visually hide text, still accessible */
    width: 32px; height: 32px; justify-content: center;
  }

  .et_pb_menu .menu-item.psl-search-menu-item > a::before {
    content: "";
    display: inline-block;
    width: 20px; height: 20px;
    background: currentColor;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M15.5 14h-.79l-.28-.28A6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.22-1.57l.28.28v.79l4.99 5 1.41-1.41-5-4.99ZM9.5 14A4.5 4.5 0 1 1 14 9.5 4.505 4.505 0 0 1 9.5 14Z"/></svg>') center/contain no-repeat;
            mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M15.5 14h-.79l-.28-.28A6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.22-1.57l.28.28v.79l4.99 5 1.41-1.41-5-4.99ZM9.5 14A4.5 4.5 0 1 1 14 9.5 4.505 4.505 0 0 1 9.5 14Z"/></svg>') center/contain no-repeat;
  }

  ul#menu-utility-menu {
    align-items: center;
  }

  /* Hide Search link in MAIN menu on desktop (keep visible in Utility menu) */
  @media (min-width: 981px) {
    #menu-main-menu .menu-item.psl-search-menu-item { display: none !important; }
  }

  @media (max-width: 980px) {
    .psl-search-overlay { padding: 0; place-items: stretch; }
    .psl-search-panel { width: 100%; min-height: 100vh; border-radius: 0; padding: 16px; }
    /* On mobile, show the Search label normally */
    .et_pb_menu .menu-item.psl-search-menu-item > a { font-size: inherit; width: auto; height: auto; }
  }
  
