/* PGP final header-only fix
   Keeps the whole site on #141414, but restores the upper header behavior/design.
   This file must load after pgp-141414-uniform-lock.css. */
:root{
  --pgp-site-header-bg: transparent !important;
  --pgp-site-header-text:#f5f7fb !important;
  --pgp-site-header-tab-bg:#ffffff !important;
  --pgp-site-header-tab-text:#111315 !important;
  --pgp-site-header-hover-bg:#ffffff !important;
  --pgp-site-header-active-bg:#f3144e !important;
  --pgp-site-header-active-text:#ffffff !important;
  --pgp-site-header-icon:#ffffff !important;
  --pgp-site-search-bg:#ffffff !important;
  --pgp-site-search-text:#111315 !important;
}

/* Do not let the 141414 site preset paint the upper header as a block. */
.pgp-app-header,
.pgp-public-header,
.pgp-header,
.site-header,
body > header{
  background:transparent !important;
  background-image:none !important;
  border:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
.pgp-app-header::before,
.pgp-app-header::after,
.pgp-public-header::before,
.pgp-public-header::after,
.pgp-header::before,
.pgp-header::after,
.site-header::before,
.site-header::after{
  content:none !important;
  display:none !important;
  background:transparent !important;
  background-image:none !important;
}

/* Restore top tabs: white button + black text. Hover should NOT turn the text white. */
.pgp-app-header .pgp-header-tab,
.pgp-app-header .pgp-header-tabs .pgp-header-tab{
  color:#111315 !important;
  background:transparent !important;
  text-shadow:none !important;
  opacity:1 !important;
  overflow:visible !important;
}
.pgp-app-header .pgp-header-tab::before,
.pgp-app-header .pgp-header-tabs .pgp-header-tab::before{
  background:#ffffff !important;
  background-image:none !important;
  border-color:transparent !important;
  box-shadow:none !important;
}
.pgp-app-header .pgp-header-tab span,
.pgp-app-header .pgp-header-tab svg,
.pgp-app-header .pgp-header-tab svg *,
.pgp-app-header .pgp-iraq-icon,
.pgp-app-header .pgp-iraq-icon *{
  color:currentColor !important;
  stroke:currentColor !important;
  opacity:1 !important;
  visibility:visible !important;
}
.pgp-app-header .pgp-header-tab:not(.is-active):not(.active):not([aria-current="page"]):hover,
.pgp-app-header .pgp-header-tab:not(.is-active):not(.active):not([aria-current="page"]):hover span{
  color:#111315 !important;
}
.pgp-app-header .pgp-header-tab:not(.is-active):not(.active):not([aria-current="page"]):hover::before{
  background:#ffffff !important;
  background-image:none !important;
}
.pgp-app-header .pgp-header-tab.is-active,
.pgp-app-header .pgp-header-tab.active,
.pgp-app-header .pgp-header-tab[aria-current="page"],
.pgp-app-header .pgp-header-tab.is-active span,
.pgp-app-header .pgp-header-tab.active span,
.pgp-app-header .pgp-header-tab[aria-current="page"] span{
  color:#ffffff !important;
}
.pgp-app-header .pgp-header-tab.is-active::before,
.pgp-app-header .pgp-header-tab.active::before,
.pgp-app-header .pgp-header-tab[aria-current="page"]::before{
  background:#f3144e !important;
  background-image:none !important;
}
.pgp-app-header .pgp-header-tab.is-active:hover,
.pgp-app-header .pgp-header-tab.active:hover,
.pgp-app-header .pgp-header-tab[aria-current="page"]:hover,
.pgp-app-header .pgp-header-tab.is-active:hover span,
.pgp-app-header .pgp-header-tab.active:hover span,
.pgp-app-header .pgp-header-tab[aria-current="page"]:hover span{
  color:#ffffff !important;
}
.pgp-app-header .pgp-header-tab.is-active:hover::before,
.pgp-app-header .pgp-header-tab.active:hover::before,
.pgp-app-header .pgp-header-tab[aria-current="page"]:hover::before{
  background:#f3144e !important;
}

/* Search stays clear: white input, black text, no dark header color inside it. */
.pgp-app-header .pgp-header-search-form{
  background:#ffffff !important;
  background-image:none !important;
  border-color:transparent !important;
  color:#111315 !important;
  box-shadow:0 10px 22px rgba(0,0,0,.18) !important;
}
.pgp-app-header .pgp-header-search-input,
.pgp-app-header .pgp-header-search-input::placeholder,
.pgp-app-header .pgp-header-search-icon{
  background:transparent !important;
  color:#111315 !important;
  stroke:#111315 !important;
}

/* Language + three lines stay like the old transparent header. */
.pgp-app-header .pgp-header-lang-btn,
.pgp-app-header .pgp-header-lang-btn span,
.pgp-app-header .pgp-header-lang-btn svg{
  background:transparent !important;
  color:#ffffff !important;
  stroke:#ffffff !important;
}
.pgp-app-header .pgp-parts-menu-button,
.pgp-app-header .pgp-menu-trigger{
  background:transparent !important;
  background-image:none !important;
  border:0 !important;
  box-shadow:none !important;
}
.pgp-app-header .pgp-parts-menu-button span,
.pgp-app-header .pgp-menu-trigger span{
  background:#ffffff !important;
}

/* Mobile: restore compact top header so the third button is not cut. */
@media (max-width:768px){
  .pgp-app-header{
    padding:10px 10px 8px !important;
    background:transparent !important;
  }
  .pgp-app-header-inner{
    display:grid !important;
    grid-template-columns:68px minmax(0,1fr) 36px 30px !important;
    align-items:center !important;
    gap:6px !important;
    max-width:100% !important;
  }
  .pgp-header-left{min-width:0 !important;}
  .pgp-logo-link img{
    width:66px !important;
    max-width:66px !important;
  }
  .pgp-header-tabs{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:5px !important;
    width:100% !important;
    min-width:0 !important;
    overflow:visible !important;
    padding:0 !important;
    -webkit-overflow-scrolling:auto !important;
  }
  .pgp-app-header .pgp-header-tab{
    flex:1 1 0 !important;
    min-width:0 !important;
    max-width:none !important;
    height:24px !important;
    min-height:24px !important;
    padding:0 4px !important;
    gap:3px !important;
    font-size:8px !important;
    line-height:1 !important;
    letter-spacing:0 !important;
    white-space:nowrap !important;
    overflow:visible !important;
  }
  .pgp-app-header .pgp-header-tab::before{
    clip-path:polygon(4px 0,100% 0,calc(100% - 4px) 100%,0 100%) !important;
  }
  .pgp-app-header .pgp-header-tab svg,
  .pgp-app-header .pgp-iraq-icon{
    width:12px !important;
    height:12px !important;
    flex:0 0 12px !important;
  }
  .pgp-app-header .pgp-header-tab span{
    display:inline-block !important;
    min-width:0 !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:nowrap !important;
  }
  .pgp-app-header .pgp-header-lang-wrap{
    width:36px !important;
    min-width:36px !important;
  }
  .pgp-app-header .pgp-header-lang-btn{
    width:36px !important;
    min-width:36px !important;
    height:24px !important;
    min-height:24px !important;
    padding:0 !important;
    gap:2px !important;
    font-size:9px !important;
    letter-spacing:.12em !important;
  }
  .pgp-app-header .pgp-header-lang-btn svg{
    width:9px !important;
    height:9px !important;
  }
  .pgp-app-header .pgp-parts-menu-button{
    width:30px !important;
    height:24px !important;
    min-height:24px !important;
    padding:0 !important;
  }
  .pgp-app-header .pgp-parts-menu-button span{
    width:22px !important;
    height:3px !important;
  }
  .pgp-header-search-wrap{
    margin:0 auto 14px !important;
  }
  .pgp-header-search-form{
    width:230px !important;
    max-width:58vw !important;
    height:28px !important;
  }
}

@media (max-width:390px){
  .pgp-app-header-inner{
    grid-template-columns:60px minmax(0,1fr) 34px 28px !important;
    gap:5px !important;
  }
  .pgp-logo-link img{width:58px !important;max-width:58px !important;}
  .pgp-header-tabs{gap:4px !important;}
  .pgp-app-header .pgp-header-tab{font-size:7.4px !important;padding:0 3px !important;gap:2px !important;}
  .pgp-app-header .pgp-header-tab svg,.pgp-app-header .pgp-iraq-icon{width:11px !important;height:11px !important;flex-basis:11px !important;}
  .pgp-app-header .pgp-header-lang-wrap,.pgp-app-header .pgp-header-lang-btn{width:34px !important;min-width:34px !important;}
  .pgp-app-header .pgp-header-lang-btn{font-size:8px !important;}
  .pgp-app-header .pgp-parts-menu-button{width:28px !important;}
}
