/* Header search overlay — standalone so UI works even if main-rtl.css is cached/old */
.hdrSecBox .hdrLftMnu .openSrchIcon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
  border: 0 !important;
  font-size: 0 !important;
  line-height: 1;
  cursor: pointer;
  background-color: transparent !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23444444' stroke-width='2'/%3E%3Cpath d='M20 20l-4.2-4.2' stroke='%23444444' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.hdrSecBox .hdrLftMnu .openSrchIcon:before {
  content: none !important;
}
.hdrSecBox .hdrLftMnu .openSrchIcon:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23ED3354' stroke-width='2'/%3E%3Cpath d='M20 20l-4.2-4.2' stroke='%23ED3354' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.hdrSearchOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 90px 16px 24px;
  background: rgba(15, 15, 15, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.hdrSearchOverlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.hdrSearchPanel {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  padding: 18px;
  transform: translateY(-18px) scale(0.96);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
.hdrSearchOverlay.open .hdrSearchPanel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.hdrSearchPanel .hdrSrchHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.hdrSearchPanel .hdrSrchHead strong {
  color: #222;
  font-size: 16px;
  font-weight: 700;
}
.hdrSearchPanel .closeSrch {
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #666;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  margin: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.hdrSearchPanel .closeSrch:hover {
  color: #ED3354;
  background: rgba(237, 51, 84, 0.08) !important;
}
.hdrSearchPanel .hdrSrchForm {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  border: 1px solid #e6e6e6;
  background: #f7f7f7;
  border-radius: 10px;
  padding: 4px;
  margin: 0;
}
.hdrSearchPanel .hdrSrchForm:focus-within {
  border-color: #ED3354;
}
.hdrSearchPanel .hdrSrchForm input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #222;
  font-size: 15px;
  padding: 0 12px;
  outline: none;
  height: auto;
}
.hdrSearchPanel .hdrSrchForm button[type="submit"] {
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  background: #ED3354 !important;
  color: #fff !important;
  min-width: 52px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin: 0;
}
.hdrSearchPanel .hdrSrchForm button[type="submit"]:hover {
  opacity: 0.92;
}
.hdrSearchPanel .icon-search-magnifier {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M20 20l-4.2-4.2' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.hdrSearchPanel .icon-search-magnifier:before {
  content: none !important;
}

body.dark-mode .hdrSearchPanel,
html.dark .hdrSearchPanel {
  background: #1e1e1e;
  border-color: #333;
}
body.dark-mode .hdrSearchPanel .hdrSrchHead strong,
html.dark .hdrSearchPanel .hdrSrchHead strong {
  color: #f2f2f2;
}
body.dark-mode .hdrSearchPanel .hdrSrchForm,
html.dark .hdrSearchPanel .hdrSrchForm {
  background: #2a2a2a;
  border-color: #444;
}
body.dark-mode .hdrSearchPanel .hdrSrchForm input,
html.dark .hdrSearchPanel .hdrSrchForm input {
  color: #f2f2f2;
}

@media (max-width: 767px) {
  .hdrSearchOverlay {
    padding-top: 72px;
  }
}
