/* Tool Directory: Live Search, Category Filters, Quick Launch & Native App Support */

.tool-filter-wrapper {
  max-width: 900px;
  margin: 0 auto 1.5rem auto;
  padding: 0 1rem;
}

/* Instant Search Input */
.tool-search-box {
  position: relative;
  margin-bottom: 1rem;
}

.tool-search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.tool-search-input:focus {
  border-color: #185a9d;
  box-shadow: 0 0 0 4px rgba(24, 90, 157, 0.15);
}

.tool-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 1.1rem;
  pointer-events: none;
}

.tool-search-clear {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: #e2e8f0;
  border: none;
  color: #475569;
  font-size: 1.1rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool-search-clear:hover {
  background: #cbd5e1;
  color: #0f172a;
}

/* Category Filter Pills */
.category-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.category-pill {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  padding: 0.45rem 1.1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  outline: none;
}

.category-pill:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.category-pill.active {
  background: linear-gradient(135deg, #185a9d 0%, #43cea2 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(24, 90, 157, 0.25);
}

/* Quick Launch / Recently Used Strip */
.quick-launch-bar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px dashed #43cea2;
  border-radius: 12px;
  padding: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  display: none; /* revealed via JS if recent items exist */
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
}

.quick-launch-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.quick-launch-items {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-launch-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none !important;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.quick-launch-item:hover {
  border-color: #43cea2;
  color: #185a9d;
  background: #f0fdf4;
  transform: translateY(-1px);
}

/* Empty State / No Results */
.no-results-msg {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #475569;
  font-size: 1.05rem;
  display: none;
  background: #ffffff;
  border-radius: 14px;
  max-width: 600px;
  margin: 1rem auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Tool Grid Animation */
.tool-grid {
  transition: opacity 0.15s ease;
}

.menu-card.is-hidden {
  display: none !important;
}

/* Native App Specific Adjustments */
body.is-native-app .hero-app-promo,
body.is-native-app .app-promo-section,
body.is-native-app #th-leaderboard-ad,
body.is-native-app .ad-wrapper {
  display: none !important;
}

body.is-native-app {
  padding-bottom: 75px !important;
}

@media (max-width: 600px) {
  .category-pill {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
  }
  .tool-search-input {
    font-size: 0.95rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}
