/* Manzari Smart Search – Styling */

:root {
  --mss-text: #444444;
  --mss-blue: #005CE9;
  --mss-border: #e5e7eb;
  --mss-bg: #ffffff;
}

.mss-wrapper {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  font-family: 'Roboto', sans-serif;
  color: var(--mss-text);
}

.mss-field {
  position: relative;
}

.mss-input {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border: 2px solid var(--mss-blue);
  border-radius: 12px;
  background: var(--mss-bg);
  color: var(--mss-text);
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.mss-input:focus {
  border-color: var(--mss-blue);
  box-shadow: 0 0 0 4px rgba(0,92,233,.16);
}

.mss-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-52%);
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #9aa0a6;
  cursor: pointer;
}

.mss-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--mss-border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,.10);
  z-index: 99;
  overflow: hidden;
}

.mss-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 420px;
  overflow: auto;
}

.mss-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.mss-item:hover,
.mss-item:focus {
  background: #f7f9ff;
  outline: none;
}

.mss-logo {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: #f1f3f5;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.mss-logo img { width: 100%; height: 100%; object-fit: contain; }
.mss-logo--placeholder::after {
  content: '';
  width: 18px; height: 18px;
  background: linear-gradient(135deg, #cfd6e0, #e6ebf2);
  border-radius: 4px;
}

.mss-meta { display: flex; flex-direction: column; min-width: 0; }
.mss-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--mss-text);
  line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mss-snippet {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mss-mark {
  background: #ffec99;
  padding: 0 .1em;
  border-radius: 3px;
}

/* mobile */
@media (max-width: 640px){
  .mss-wrapper { max-width: 100%; }
}


/* === Manzari Smart Search — match Finder styling === */

/* Base: blue outline */
.mss-input{
  border: 2px solid #005CE9 !important;          /* blue */
  background: #fff !important;
  color: #444 !important;
}

/* Hover: mustard border + soft ring */
.mss-input:hover{
  border-color: #ffb700 !important;               /* mustard */
  box-shadow: 0 0 0 4px rgba(255,183,0,.18), 
              0 6px 14px rgba(0,0,0,.10) !important;
}

/* Focus: blue border + ring (accessibility) */
.mss-input:focus,
.mss-input:focus-visible{
  outline: none !important;
  border-color: #005CE9 !important;
  box-shadow: 0 0 0 4px rgba(0,92,233,.20),
              0 8px 18px rgba(0,0,0,.12) !important;
}

/* Keep results panel consistent and crisp */
.mss-results{
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
}

/* Optional: subtle row hover to match feel */
.mss-item:hover,
.mss-item:focus{
  background: #f7f9ff !important;
}

/* === Smart Search: mustard focus + Finder radius match === */

/* Set the same corner radius as Finder (12px).
   If your Finder uses a different radius, change both to that value. */
.mss-input,
.mss-results {
  border-radius: 12px !important;
}

/* Base: blue outline (consistent with Finder idle state) */
.mss-input{
  border: 2px solid #005CE9 !important;  /* blue */
  background: #fff !important;
  color: #444 !important;
}

/* Hover: mustard border + soft ring (same as Finder hover) */
.mss-input:hover{
  border-color: #ffb700 !important;
  box-shadow: 0 0 0 4px rgba(255,183,0,.18),
              0 6px 14px rgba(0,0,0,.10) !important;
}

/* Focus/Active: KEEP mustard while clicked into the field */
.mss-input:focus,
.mss-input:focus-visible,
.mss-input:active{
  outline: none !important;
  border-color: #ffb700 !important;
  box-shadow: 0 0 0 4px rgba(255,183,0,.18),
              0 8px 18px rgba(0,0,0,.12) !important;
}

/* While navigating results (focus moves into list), keep the mustard on the input */
.mss-wrapper:focus-within .mss-input{
  border-color: #ffb700 !important;
  box-shadow: 0 0 0 4px rgba(255,183,0,.18),
              0 8px 18px rgba(0,0,0,.12) !important;
}

/* Optional: crisp panel to match Finder look */
.mss-results{
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
}

/* === Smart Search: minimalist gray clear "×" (override Hello/Elementor colors) === */
.mss-clear{
  color: #9aa0a6 !important;             /* gray */
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  width: 28px; height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 9999px;                  /* small circular hit area */
  font-size: 20px;                        /* the × character size */
  text-shadow: none !important;
}

/* subtle hover/focus without changing to theme color */
.mss-clear:hover,
.mss-clear:focus{
  color: #6b7280 !important;              /* slightly darker gray */
  background: rgba(0,0,0,0.04) !important;
  outline: none !important;
  box-shadow: none !important;
}

/* nuke any theme-injected icons/carets */
.mss-clear::before,
.mss-clear::after{
  content: none !important;
}

/* Vertically + horizontally center the clear "×" */
.mss-clear{
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;

  display: grid !important;
  place-items: center !important;

  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-size: 20px !important;
  border-radius: 9999px !important;

  color: #9aa0a6 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.mss-clear:hover,
.mss-clear:focus{
  background: rgba(0,0,0,0.04) !important;
  color: #6b7280 !important;
  outline: none !important;
  box-shadow: none !important;
}
