/**
 * Trymzo Native Mobile Search & Salon Discovery Styles
 * Responsive, touch-friendly, mobile-first design adhering to Trymzo brand tokens.
 */

.tz-search-page-container {
  background: var(--bg-body, #f8fafc);
  min-height: 100vh;
  padding-bottom: calc(76px + var(--safe-bottom, 0px));
}

/* Modal Wrapper Mode (inside openResponsiveModal) */
.tz-search-modal-wrap {
  padding-bottom: 30px;
  background: var(--bg-body, #f8fafc);
  min-height: calc(100vh - 120px);
}

.tz-search-modal-top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-card, #ffffff);
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tz-search-nav-back-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: var(--text-primary, #1e293b);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.tz-search-nav-back-btn:active {
  background: #e2e8f0;
  transform: scale(0.95);
}

/* 1. STICKY TOP SEARCH HEADER */
.tz-search-header-sticky {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--bg-card, #ffffff);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.tz-search-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.tz-search-back-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-primary, #1e293b);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.tz-search-back-btn:active {
  background: #f1f5f9;
}

.tz-search-input-box {
  flex: 1;
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 50px;
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  border: 1.5px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tz-search-input-box:focus-within {
  background: #ffffff;
  border-color: var(--primary, #4361ee);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}

.tz-search-lens-icon {
  color: var(--text-muted, #64748b);
  font-size: 17px;
  margin-left: 2px;
  margin-right: 10px;
}

.tz-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary, #1e293b);
  padding: 8px 0;
  width: 100%;
}

.tz-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.tz-search-clear-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s ease;
}

.tz-search-clear-btn:active {
  color: #475569;
}

/* 2. HORIZONTAL FILTER CHIPS TRACK */
.tz-search-filter-track {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

.tz-search-filter-track::-webkit-scrollbar {
  display: none;
}

.tz-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--border-color, #e2e8f0);
  background: var(--bg-card, #ffffff);
  color: #334155;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.tz-filter-chip:active {
  transform: scale(0.97);
}

.tz-star-icon {
  color: var(--warning, #f59e0b);
}

.tz-filter-chip i {
  font-size: 13px;
}

/* Clear All Chip */
.tz-filter-chip--clear {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  font-weight: 700;
}

.tz-filter-chip--clear:hover {
  background: #fee2e2;
}

/* Active Filter Chip (Blue / Trymzo Primary) */
.tz-filter-chip--active {
  background: rgba(67, 97, 238, 0.08);
  border-color: var(--primary, #4361ee);
  color: var(--primary, #4361ee);
  font-weight: 700;
}

/* Active Gender Selected Chip (Teal / Native mobile look from reference) */
.tz-filter-chip--gender-active {
  background: rgba(13, 148, 136, 0.08);
  border-color: #0d9488;
  color: #0f766e;
  font-weight: 700;
}

.tz-chip-remove-icon {
  font-size: 12px;
  margin-left: 4px;
  opacity: 0.9;
}

/* 3. SEARCH META HEADER */
.tz-search-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 6px;
  font-size: 13.5px;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.tz-search-total-count {
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}

/* 4. SALON CARDS DISCOVERY LIST */
.tz-search-cards-list {
  padding: 8px 14px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tz-search-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: stretch;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  -webkit-tap-highlight-color: transparent;
}

.tz-search-card:active {
  transform: scale(0.985);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Thumbnail Box (Left) */
.tz-search-thumb-box {
  width: 92px;
  min-width: 92px;
  height: 92px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
  flex-shrink: 0;
}

.tz-search-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tz-search-open-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #059669;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  line-height: 1.2;
}

/* Info Column (Right) */
.tz-search-info-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
}

.tz-search-salon-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  line-height: 1.25;
  margin: 0 0 3px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.tz-search-verified-icon {
  color: var(--primary, #4361ee);
  font-size: 13px;
  margin-left: 4px;
  vertical-align: middle;
}

.tz-search-salon-address {
  font-size: 12.5px;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Meta Badges Row */
.tz-search-badges-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: auto;
}

.tz-search-badges-row::-webkit-scrollbar {
  display: none;
}

.tz-pill-meta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.tz-pill-rating {
  background: #fef9c3;
  color: #854d0e;
}

.tz-pill-rating i {
  color: #eab308;
  font-size: 11px;
}

.tz-pill-distance {
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
}

.tz-pill-distance i {
  font-size: 11px;
  color: #64748b;
}

.tz-pill-queue {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
}

.tz-pill-queue i {
  font-size: 11px;
  color: #0284c7;
}

/* 5. EMPTY SEARCH STATE */
.tz-search-empty-state {
  text-align: center;
  padding: 48px 24px;
}

.tz-search-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(67, 97, 238, 0.08);
  color: var(--primary, #4361ee);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
}

.tz-search-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin-bottom: 6px;
}

.tz-search-empty-desc {
  font-size: 13px;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
  margin-bottom: 18px;
}

.tz-search-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--primary, #4361ee);
  color: #ffffff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(67, 97, 238, 0.25);
}

.tz-search-reset-btn:active {
  background: var(--primary-hover, #3751d4);
}

/* 6. FILTER MODAL / BOTTOM SHEET */
.tz-filter-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 999;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.tz-filter-modal-backdrop.tz-modal-open {
  display: flex;
}

.tz-filter-bottom-sheet {
  background: var(--bg-card, #ffffff);
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  padding: 16px 20px 28px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  animation: tzSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tzSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.tz-filter-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tz-filter-sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin: 0;
}

.tz-filter-sheet-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.tz-filter-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.tz-filter-option-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color, #e2e8f0);
  background: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.tz-filter-option-btn:active {
  transform: scale(0.97);
  background: #f8fafc;
}

.tz-filter-option-btn .tz-option-check {
  display: none;
  font-size: 11px;
  color: var(--primary, #4361ee);
}

.tz-filter-option-btn.tz-selected {
  background: rgba(67, 97, 238, 0.08);
  border-color: var(--primary, #4361ee);
  color: var(--primary, #4361ee);
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(67, 97, 238, 0.2);
}

.tz-filter-option-btn.tz-selected .tz-option-check {
  display: inline-flex;
}

/* 7. NATIVE MOBILE APP SHELL POLISH (FOR MODAL DRAWER) */
#modal-SearchDiscoveryModal .drawer-header {
  display: none !important;
}

#modal-SearchDiscoveryModal .drawer-body {
  padding-top: 0 !important;
  background: var(--bg-body, #f8fafc);
}
