/* =============================================
   MOBILE SEARCH OVERLAY
============================================= */
.mobile-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 200000; /* Higher than header's 100000 */
  transform: translateY(-100%);
  transition: transform 0.2s ease-out;
  display: flex;
  flex-direction: column;
}

.mobile-search-overlay.open {
  transform: translateY(0);
}

/* Fix for WordPress Admin Bar covering the top of the screen */
.admin-bar .mobile-search-overlay {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .mobile-search-overlay {
    top: 46px;
  }
}

.ms-header {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #E5E7EB;
  gap: 12px;
}

.ms-icon {
  width: 20px;
  height: 20px;
  stroke: #9CA3AF;
  fill: none;
}

.ms-input {
  flex: 1;
  border: none;
  font-size: 16px;
  padding: 8px 0;
  outline: none;
  color: #1A1A2E;
  background: transparent;
  width: 100%;
}
.ms-input::placeholder {
  color: #9CA3AF;
}

.ms-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #6B7280;
  padding: 8px;
  cursor: pointer;
}

.ms-results {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.ms-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.ms-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #1A1A2E;
  margin-bottom: 8px;
}

.ms-result-item:active {
  background: #F3F4F6;
}

.ms-result-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #F8F9FA;
}

.ms-result-details {
  display: flex;
  flex-direction: column;
}

.ms-result-title {
  font-size: 15px;
  font-weight: 600;
}

.ms-result-breadcrumb {
  font-size: 12px;
  color: #6B7280;
  margin-top: 2px;
}

.ms-highlight {
  background: rgba(46, 204, 113, 0.2);
  color: #1A1A2E;
  border-radius: 2px;
}

.ms-no-results {
  text-align: center;
  padding: 32px 16px;
  color: #6B7280;
  font-size: 15px;
}

@media (min-width: 901px) {
  .mobile-search-overlay {
    display: none !important;
  }
}
