/* --- Header Search Button + Nav Alignment (Desktop) --- */
.okel-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.okel-nav-row #primary-menu {
  flex: 1;
  min-width: 0;
}

.okel-open-search-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
}

.okel-open-search-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.5);
}

/* --- Focus States --- */
.okel-open-search-btn:focus-visible,
.okel-search-close:focus-visible,
.okel-search-input:focus-visible {
  outline: 2px solid #1685f8;
  outline-offset: 2px;
}

/* --- Full Screen Search Overlay --- */
.okel-full-search {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease;
}

.okel-full-search.is-open {
  visibility: visible;
  opacity: 1;
}

/* --- Popup Background + Panel --- */
.okel-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 12, 42, 0.7);
  backdrop-filter: blur(3px);
}

.okel-search-panel {
  position: relative;
  width: min(1080px, calc(100% - 28px));
  margin: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #eff5ff 100%);
  border: 1px solid rgba(0, 40, 128, 0.1);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 22px 60px rgba(5, 21, 66, 0.24);
}

/* --- Popup Close Button --- */
.okel-search-close {
  position: sticky;
  top: 16px;
  margin-left: auto;
  margin-right: 16px;
  margin-top: 16px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0, 13, 77, 0.12);
  background: #fff;
  color: #111827;
  display: grid;
  place-items: center;
  z-index: 2;
  cursor: pointer;
}

/* --- Popup Content --- */
.okel-search-inner {
  padding: 0 40px 28px;
}

.okel-search-kicker {
  margin: 4px 0 8px;
  color: #1685f8;
  font:
    600 0.88rem/1 var(--inter),
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.okel-search-title {
  margin: 0;
  color: #000d4d;
  font:
    700 clamp(1.4rem, 2vw, 2rem)/1.2 var(--inter),
    sans-serif;
}

.okel-search-input-wrap {
  margin-top: 14px;
  background: #fff;
  border: 1px solid #cbd7ff;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(22, 133, 248, 0.1);
}

.okel-search-input {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  font:
    500 1rem/1.4 var(--inter),
    sans-serif;
  color: #0f172a;
  background: transparent;
}

.okel-search-meta {
  margin: 10px 0 0;
  color: #4b5563;
  font:
    500 0.95rem/1.5 var(--inter),
    sans-serif;
}

/* --- Search Results Grid + Cards --- */
.okel-search-results {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.okel-search-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 13, 77, 0.1);
  background: #fff;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  min-height: 88px;
}

.okel-search-card:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 133, 248, 0.4);
  box-shadow: 0 10px 20px rgba(22, 133, 248, 0.15);
}

.okel-search-thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1f5f9;
  flex-shrink: 0;
}

.okel-search-text {
  min-width: 0;
}

.okel-search-type {
  margin: 0 0 4px;
  color: #1685f8;
  font:
    700 0.74rem/1 "Inter",
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.okel-search-name {
  margin: 0;
  color: #000d4d;
  font:
    700 0.95rem/1.3 "Mukta",
    sans-serif;
}

.okel-search-subtitle {
  margin: 2px 0 0;
  color: #4b5563;
  font:
    500 0.82rem/1.3 "Inter",
    sans-serif;
}

.okel-search-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 10px;
  background: #fff;
  border: 1px dashed rgba(0, 13, 77, 0.25);
  color: #374151;
  font:
    500 0.95rem/1.5 "Inter",
    sans-serif;
}

/* --- Body/3rd Party Overlay Behavior --- */
body.okel-search-open {
  overflow: hidden;
}

body.okel-search-open .st-sticky-share-buttons,
body.okel-search-open .st-inline-share-buttons,
body.okel-search-open .st-btn-container,
body.okel-search-open [id^="st-"] {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* --- Mobile Navigation + Search Responsiveness --- */
@media (max-width: 767px) {
  .main-navigation .okel-container {
    position: relative;
    padding-right: 0;
  }

  .okel-nav-row {
    display: block;
    padding: 0 6px 8px;
  }

  .okel-nav-row #primary-menu {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .okel-nav-row .nav-items-wrapper {
    display: inline-flex;
    flex-wrap: nowrap;
    min-width: max-content;
    padding-right: 6px;
  }

  .okel-open-search-btn {
    width: 38px;
    height: 38px;
    position: relative;
    margin: 8px 0 0 auto;
    display: flex;
    z-index: 3;
    padding-right: 10px;
    padding-left: 10px;
    justify-content: space-between;
  }

  .okel-search-panel {
    width: calc(100% - 6px);
    max-height: calc(100vh - 10px);
    display: flex;
    flex-direction: column;
  }

  .okel-search-inner {
    padding: 0 12px 24px;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .okel-search-results {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
    padding-bottom: 16px;
  }
}
