/* PanelShop — Mobile drawer search (full width) */

.panelshop-mobile-search {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  direction: rtl;
  line-height: 1.35;
}

.panelshop-mobile-search *,
.panelshop-mobile-search *::before,
.panelshop-mobile-search *::after {
  box-sizing: border-box;
}

.ps-mobile-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 4px 10px 4px 6px;
  background: var(--ps-surface-50, #f8fafc);
  border: none;
  border-radius: var(--ps-radius-lg, 12px);
  transition: background 0.2s ease;
}

.panelshop-mobile-search:focus-within .ps-mobile-search-bar {
  background: var(--ps-surface-100, #f1f5f9);
}

.ps-mobile-search-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--ps-surface-400, #94a3b8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.panelshop-mobile-search:focus-within .ps-mobile-search-icon {
  color: var(--ps-primary-600, #2563eb);
}

.ps-mobile-search-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

/* 16px real size prevents iOS zoom; scale makes it look ~13px */
.ps-mobile-search-input-wrap {
  flex: 1 1 auto;
  min-width: 0;
  height: 22px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ps-mobile-search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 123%;
  height: 22px;
  padding: 0;
  margin: 0;
  border: none !important;
  background: transparent !important;
  font-size: 16px;
  line-height: 1.25;
  color: var(--ps-surface-800, #1e293b);
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform: scale(0.8125);
  transform-origin: 100% 50%;
}

.ps-mobile-search-input:focus,
.ps-mobile-search-input:focus-visible,
.ps-mobile-search-input:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.ps-mobile-search-input::placeholder {
  color: var(--ps-surface-400, #94a3b8);
}

.ps-mobile-search-clear {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--ps-surface-200, #e2e8f0);
  color: var(--ps-surface-600, #475569);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.ps-mobile-search-clear[hidden] {
  display: none !important;
}

.ps-mobile-search-clear:hover {
  background: var(--ps-surface-300, #cbd5e1);
  color: var(--ps-surface-800, #1e293b);
}

.ps-mobile-search-results {
  margin-top: 8px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--ps-surface-200, #e2e8f0);
  border-radius: var(--ps-radius-lg, 12px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  max-height: min(52vh, 360px);
  overflow-y: auto;
  padding: 4px 0;
}

.ps-mobile-search-results[hidden] {
  display: none !important;
}

.panelshop-mobile-search .ps-search-item {
  padding: 10px 12px;
}

.panelshop-mobile-search .ps-search-item-thumb-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--ps-radius, 10px);
}

.panelshop-mobile-search .ps-search-item-body strong {
  font-size: 13px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.panelshop-mobile-search .ps-search-item-price {
  font-size: 12px;
  margin-top: 2px;
}

.panelshop-mobile-search .ps-search-msg {
  padding: 20px 14px;
  font-size: 12px;
}

/* Elementor / drawer: always full width of parent */
.elementor-widget-panelshop_mobile_search,
.elementor-widget-panelshop_mobile_search .elementor-widget-container,
.elementor-widget-panelshop_mobile_search .panelshop-elementor-inner,
.elementor-widget-panelshop_mobile_search .panelshop-mobile-search {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 100% !important;
}

.elementor-widget-panelshop_mobile_search .panelshop-elementor-inner {
  display: block;
}

/* Theme / Elementor input border overrides */
.panelshop-header-search .ps-header-search-input,
.panelshop-mobile-search .ps-mobile-search-input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background-image: none !important;
}

.panelshop-header-search input:focus,
.panelshop-mobile-search input:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
