/* =============================================================
   SPH Level Search — Frontend Widget Styles
   sortpuzzlehelp.com
   ============================================================= */

/* Wrapper */
.sph-level-search {
  margin-bottom: 28px;
}

/* Search row */
.sph-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sph-card-bg, #1a1a2e);
  border: 1.5px solid var(--sph-border, rgba(255, 255, 255, 0.10));
  border-radius: 12px;
  padding: 10px 14px;
  flex-wrap: wrap;
}

/* Icon */
.sph-search-icon {
  font-size: 18px;
  flex-shrink: 0;
  opacity: 0.7;
  line-height: 1;
}

/* Game selector dropdown (multi-game mode only) */
.sph-game-select {
  flex-shrink: 0;
  background: var(--sph-input-bg, rgba(255, 255, 255, 0.07));
  color: var(--sph-text, #fff);
  border: 1.5px solid var(--sph-border, rgba(255, 255, 255, 0.15));
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.18s;
  max-width: 180px;
}

.sph-game-select:focus {
  border-color: #9228f0;
}

/* Level number input */
.sph-level-input {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--sph-text, #fff);
  font-size: 15px;
  font-family: inherit;
}

.sph-level-input::placeholder {
  color: var(--sph-muted, rgba(255, 255, 255, 0.40));
}

/* Hide browser number spin arrows */
.sph-level-input::-webkit-outer-spin-button,
.sph-level-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.sph-level-input[type="number"] {
  -moz-appearance: textfield;
}

/* Go button */
.sph-search-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, #cc80ff, #9228f0);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.12s;
  white-space: nowrap;
}

.sph-search-btn:hover  { opacity: 0.87; }
.sph-search-btn:active { transform: scale(0.97); }

/* Hint / error message */
.sph-search-hint {
  font-size: 13px;
  margin-top: 7px;
  min-height: 18px;
  color: var(--sph-muted, rgba(255, 255, 255, 0.45));
}

.sph-search-hint.error {
  color: #ff7272;
  font-weight: 500;
}

/* Responsive — stack on small screens */
@media (max-width: 480px) {
  .sph-search-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .sph-game-select,
  .sph-level-input,
  .sph-search-btn {
    width: 100%;
    max-width: 100%;
  }

  .sph-search-icon {
    display: none;
  }
}
