/* Fullscreen Search Overlay */
.et-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000; /* peste mobile menu (4000) */
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
}
.et-search-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Backdrop + background albastru */
.et-search-backdrop {
  position: absolute;
  inset: 0;
  background: #154ADC;
  opacity: 1;
}

/* Conținut */
.et-search-inner {
  position: relative;
  z-index: 1;
  width: min(860px, 92vw);
  padding: 32px 18px;
  text-align: center;
  color: #fff;
  transform: translateY(8px);
  opacity: 0;
  transition: transform .22s ease-out, opacity .22s ease-out;
}
.et-search-overlay.is-open .et-search-inner {
  transform: translateY(0);
  opacity: 1;
}

.et-search-title {
  margin: 0 0 6px;
  font-size: clamp(24px, 4.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.4px;
}
.et-search-subtitle {
  margin: 0 0 20px;
  opacity: .9;
  font-size: clamp(14px, 2.4vw, 16px);
}

/* Row: input + button */
.et-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.et-search-input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 54px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.25);
  background: #fff;
  color: #0D1B2A;
  padding: 0 16px;
  font-size: 16px;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.et-search-input::placeholder { color: #6B7280; }
.et-search-input:focus {
  border-color: #E6EAF5;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.22);
}

.et-search-submit {
  height: 54px;
  border-radius: 14px;
  border: 0;
  padding: 0 20px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  background: #fff;
  color: #154ADC;
  transition: transform .12s ease, box-shadow .18s ease, background-color .12s ease, color .12s ease;
}
.et-search-submit:hover,
.et-search-submit:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(21,74,220,0.28), 0 2px 6px rgba(0,0,0,0.06);
  outline: none;
}

/* Close button (colț dreapta sus) */
.et-search-close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: pointer;
  transition: background-color .18s ease, transform .12s ease;
}
.et-search-close:hover,
.et-search-close:focus-visible {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
  outline: none;
}

/* A11y: screen-reader-only helper */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Responsive */
@media (max-width: 575.98px) {
  .et-search-inner { padding: 22px 14px; width: min(640px, 94vw); }
  .et-search-row { grid-template-columns: 1fr; gap: 8px; }
  .et-search-submit { width: 100%; }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .et-search-inner { transition: none; transform: none; opacity: 1; }
}

/* Interop cu modurile de accesibilitate: păstrează identitatea vizuală */
html.a11y-theme-high .et-search-overlay,
html.a11y-theme-negative .et-search-overlay,
html.a11y-theme-light .et-search-overlay {
  color: #fff !important;
}
html.a11y-theme-high .et-search-backdrop,
html.a11y-theme-negative .et-search-backdrop,
html.a11y-theme-light .et-search-backdrop {
  background-color: #154ADC !important;
}
html.a11y-theme-high .et-search-input,
html.a11y-theme-negative .et-search-input,
html.a11y-theme-light .et-search-input {
  background: #fff !important;
  color: #0D1B2A !important;
  border-color: #E6EAF5 !important;
}
html.a11y-theme-high .et-search-submit,
html.a11y-theme-negative .et-search-submit,
html.a11y-theme-light .et-search-submit {
  background: #fff !important;
  color: #154ADC !important;
}