/* ===================================================================
   Studmob Global Search overlay — premium, Unstop-style
   =================================================================== */
.ss-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  background: rgba(15,17,26,0.5);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.ss-overlay.open { display: block; }
.ss-overlay * { box-sizing: border-box; }

.ss-panel {
  max-width: 680px;
  margin: 7vh auto 0;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.32);
  animation: ssPop 0.18s ease;
}
@keyframes ssPop { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Header: close (top-right), Looking-for dropdown, search bar */
.ss-header {
  padding: 16px 18px 14px;
  border-bottom: 1px solid #eef0f3;
}

/* Close button (top-right, centered icon) */
.ss-close {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: #f2f4f7;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; color: #475467;
  margin: 0 0 10px auto;
}
.ss-close:hover { background: #e9ebef; }
.ss-close svg { display: block; }

/* Looking-for dropdown */
.ss-looking { position: relative; margin-bottom: 12px; }
.ss-look-label {
  display: block;
  font-size: 13.5px; font-weight: 700; color: #2c2c3a;
  margin-bottom: 7px;
}
.ss-look-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  background: #fff;
  border: 1.5px solid #e2e5ea;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px; font-weight: 500;
  color: #1f2430;
  cursor: pointer;
  font-family: inherit;
}
.ss-look-btn:hover { border-color: #c9b8e0; }
.ss-look-btn svg { color: #9aa1ad; }
.ss-look-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #ece5fb;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(74,26,110,0.16);
  padding: 6px;
  z-index: 5;
  display: none;
}
.ss-look-menu.open { display: block; }
.ss-look-opt {
  display: block; width: 100%; text-align: left;
  background: none; border: none;
  padding: 11px 14px; border-radius: 8px;
  font-size: 14.5px; color: #2c2c3a; cursor: pointer;
  font-family: inherit;
}
.ss-look-opt:hover { background: #f6f4fa; color: #4a1a6e; }

/* Search bar (full width, rounded, matches dropdown) */
.ss-inputwrap {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: #fff;
  border: 1.5px solid #e2e5ea;
  border-radius: 12px;
  padding: 13px 16px;
}
.ss-inputwrap:focus-within { border-color: #c9b8e0; }
.ss-inputwrap svg { color: #9aa1ad; flex-shrink: 0; }
.ss-input {
  flex: 1; border: none; outline: none;
  font-size: 15px; color: #1a1a2e; background: none;
  font-family: inherit; min-width: 0;
}
.ss-input::placeholder { color: #9aa1ad; }

/* Results */
.ss-results { max-height: 64vh; overflow-y: auto; padding: 6px 0; }
.ss-empty, .ss-loading { padding: 30px 20px; text-align: center; font-size: 14px; color: #98a2b3; }

/* Explore grid (empty state) */
.ss-explore { padding: 18px 18px 22px; }
.ss-explore-title {
  font-size: 17px; font-weight: 800; color: #1a1235;
  margin-bottom: 16px; letter-spacing: -0.3px;
}
.ss-explore-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 10px;
}
.ss-ex-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none;
  padding: 4px;
}
.ss-ex-ico {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #f5f2fb;
  color: #4a1a6e;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.15s;
}
.ss-ex-ico svg { width: 24px; height: 24px; }
.ss-ex-item:hover .ss-ex-ico { background: #ece3f8; transform: translateY(-2px); }
.ss-ex-label { font-size: 12.5px; font-weight: 600; color: #3a3550; text-align: center; }

/* Result groups */
.ss-group { padding: 6px 0; }
.ss-group + .ss-group { border-top: 1px solid #f2f4f7; }
.ss-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px 6px;
}
.ss-group-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: #4a1a6e;
}
.ss-group-count { font-size: 11.5px; color: #9aa1ad; }

.ss-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; text-decoration: none;
  transition: background 0.12s;
}
.ss-item:hover { background: #f6f4fa; }
.ss-thumb {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #f4f0f8; color: #4a1a6e;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.ss-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ss-item-title {
  font-size: 14.5px; font-weight: 600; color: #1f2430;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-seeall {
  display: block; padding: 9px 18px 6px;
  font-size: 13px; font-weight: 600; color: #4a1a6e; text-decoration: none;
}
.ss-seeall:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 600px) {
  .ss-panel { margin: 0; border-radius: 0; max-width: 100%; height: 100%; height: 100dvh; display: flex; flex-direction: column; }
  .ss-results { max-height: none; flex: 1; }
  .ss-explore-grid { grid-template-columns: repeat(4, 1fr); gap: 14px 6px; }
  .ss-ex-ico { width: 52px; height: 52px; }
  .ss-ex-label { font-size: 11.5px; }
}
@media (max-width: 380px) {
  .ss-explore-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===================================================================
   FIX: force text visibility (theme was hiding/whitening text)
   =================================================================== */
.ss-look-btn, .ss-look-val { color: #1f2430 !important; }
.ss-look-opt { color: #2c2c3a !important; }
.ss-look-opt:hover { color: #4a1a6e !important; }
.ss-input { color: #1a1a2e !important; -webkit-text-fill-color: #1a1a2e !important; }
.ss-input::placeholder { color: #9aa1ad !important; -webkit-text-fill-color: #9aa1ad !important; }
.ss-ex-label { color: #3a3550 !important; }
.ss-item-title { color: #1f2430 !important; }
.ss-group-label { color: #4a1a6e !important; }
