
/* =========================================================
   PGP v249 — Search static size / no resize flicker
   الهدف:
   - منع البحث يصغر/يكبر/يصغر أثناء التحميل.
   - تثبيت الحجم من أول paint.
   - إلغاء أي transition أو animation على البحث.
   - إبقاء الكورسر والضغط شغال.
   ========================================================= */

:root{
  --pgp-search-final-w:360px;
  --pgp-search-final-h:34px;
  --pgp-search-final-btn:30px;
  --pgp-search-final-font:12px;
  --pgp-search-final-pr:36px;
  --pgp-search-final-icon:15px;
}

html body .pgp-app-header .pgp-header-search-wrap,
html body .pgp-header-search-wrap{
  width:var(--pgp-search-final-w)!important;
  max-width:var(--pgp-search-final-w)!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
  pointer-events:auto!important;
  overflow:visible!important;
  z-index:9990!important;
  transition:none!important;
  animation:none!important;
}

html body .pgp-app-header .pgp-header-search-form,
html body .pgp-header-search-form{
  width:var(--pgp-search-final-w)!important;
  max-width:var(--pgp-search-final-w)!important;
  min-width:0!important;

  height:var(--pgp-search-final-h)!important;
  min-height:var(--pgp-search-final-h)!important;
  max-height:var(--pgp-search-final-h)!important;

  padding:2px 4px 2px 10px!important;
  box-sizing:border-box!important;
  pointer-events:auto!important;
  overflow:visible!important;
  z-index:9991!important;
  transition:none!important;
  animation:none!important;
  transform:none!important;
}

html body .pgp-app-header .pgp-header-search-input,
html body .pgp-header-search-input{
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  font-size:var(--pgp-search-final-font)!important;
  line-height:1!important;
  padding:0 var(--pgp-search-final-pr) 0 0!important;
  pointer-events:auto!important;
  cursor:text!important;
  user-select:text!important;
  -webkit-user-select:text!important;
  caret-color:#111315!important;
  transition:none!important;
  animation:none!important;
  transform:none!important;
}

html body .pgp-app-header .pgp-header-search-submit,
html body .pgp-header-search-submit,
html body .pgp-header-search-submit:hover,
html body .pgp-header-search-submit:focus,
html body .pgp-header-search-submit:active,
html body .pgp-header-search-submit.pgp-unified-search-submit,
html body .pgp-header-search-submit.pgp-v40-normalized{
  position:absolute!important;
  width:var(--pgp-search-final-btn)!important;
  height:var(--pgp-search-final-btn)!important;
  min-width:var(--pgp-search-final-btn)!important;
  min-height:var(--pgp-search-final-btn)!important;
  max-width:var(--pgp-search-final-btn)!important;
  max-height:var(--pgp-search-final-btn)!important;
  flex:0 0 var(--pgp-search-final-btn)!important;
  flex-basis:var(--pgp-search-final-btn)!important;
  right:2px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  pointer-events:auto!important;
  z-index:9993!important;
  transition:none!important;
  animation:none!important;
}

html body .pgp-app-header .pgp-header-search-submit svg,
html body .pgp-header-search-submit svg,
html body .pgp-app-header .pgp-header-search-submit > svg,
html body .pgp-header-search-submit > svg,
html body .pgp-header-search-submit .pgp-header-search-submit-icon{
  width:var(--pgp-search-final-icon)!important;
  height:var(--pgp-search-final-icon)!important;
  transition:none!important;
  animation:none!important;
}

/* Laptop */
@media(min-width:769px) and (max-width:1366px){
  :root{
    --pgp-search-final-w:280px;
    --pgp-search-final-h:30px;
    --pgp-search-final-btn:26px;
    --pgp-search-final-font:11px;
    --pgp-search-final-pr:32px;
    --pgp-search-final-icon:13px;
  }
}

/* Mobile */
@media(max-width:768px){
  :root{
    --pgp-search-final-w:64vw;
    --pgp-search-final-h:36px;
    --pgp-search-final-btn:32px;
    --pgp-search-final-font:15px;
    --pgp-search-final-pr:40px;
    --pgp-search-final-icon:18px;
  }
}

@media(max-width:390px){
  :root{
    --pgp-search-final-w:62vw;
    --pgp-search-final-h:34px;
    --pgp-search-final-btn:30px;
    --pgp-search-final-font:13px;
    --pgp-search-final-pr:36px;
    --pgp-search-final-icon:16px;
  }
}

/* =========================================================
   PGP v251 — Search full-click + thin black 60% frame
   - أي ضغط داخل خانة البحث يفعّل الكتابة، خصوصاً على اللابتوب.
   - الإطار الخارجي الأبيض/الغامض يصير أسود 60% بسمك خفيف.
   - بدون تغيير حجم البحث.
   - بدون سكربتات حجم.
   ========================================================= */

/* make the whole search box behave as a text field */
html body .pgp-app-header .pgp-header-search-wrap,
html body .pgp-header-search-wrap{
  pointer-events:auto!important;
  overflow:visible!important;
  z-index:9990!important;
}

html body .pgp-app-header .pgp-header-search-form,
html body .pgp-header-search-form{
  position:relative!important;
  pointer-events:auto!important;
  overflow:visible!important;
  cursor:text!important;

  border:1px solid rgba(0,0,0,.60)!important;
  outline:0!important;
  box-shadow:
    0 8px 18px rgba(0,0,0,.070),
    0 0 0 1px rgba(0,0,0,.60)!important;

  transition:none!important;
  animation:none!important;
}

/* keep the same frame on focus */
html body .pgp-app-header .pgp-header-search-form:focus-within,
html body .pgp-header-search-form:focus-within{
  border:1px solid rgba(0,0,0,.60)!important;
  outline:0!important;
  box-shadow:
    0 8px 18px rgba(0,0,0,.070),
    0 0 0 1px rgba(0,0,0,.60)!important;
}

/* remove old soft/white extra rings if injected */
html body .pgp-app-header .pgp-header-search-form::before,
html body .pgp-app-header .pgp-header-search-form::after,
html body .pgp-header-search-form::before,
html body .pgp-header-search-form::after{
  content:none!important;
  display:none!important;
  opacity:0!important;
  box-shadow:none!important;
  border:0!important;
}

/* input covers the whole bar so click anywhere starts typing */
html body .pgp-app-header .pgp-header-search-input,
html body .pgp-header-search-input{
  position:absolute!important;
  inset:0!important;
  z-index:3!important;

  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  max-height:100%!important;

  padding-left:12px!important;
  padding-right:calc(var(--pgp-search-final-btn, 30px) + 14px)!important;
  box-sizing:border-box!important;

  pointer-events:auto!important;
  cursor:text!important;
  user-select:text!important;
  -webkit-user-select:text!important;
  caret-color:#111315!important;

  color:rgba(17,19,21,.72)!important;
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  text-align:center!important;

  transition:none!important;
  animation:none!important;
}

html body .pgp-app-header .pgp-header-search-input::placeholder,
html body .pgp-header-search-input::placeholder{
  color:rgba(17,19,21,.56)!important;
  opacity:1!important;
}

/* the arrow remains clickable above the input */
html body .pgp-app-header .pgp-header-search-submit,
html body .pgp-header-search-submit,
html body .pgp-header-search-submit:hover,
html body .pgp-header-search-submit:focus,
html body .pgp-header-search-submit:active,
html body .pgp-header-search-submit.pgp-unified-search-submit,
html body .pgp-header-search-submit.pgp-v40-normalized{
  z-index:8!important;
  pointer-events:auto!important;
  cursor:pointer!important;
  border:0!important;
  outline:0!important;
}

