/* ===============================
   styles-search.css
   For: search.html (Village Map)
   Clean + isolated from control console
================================ */

/* ---------- Tokens ---------- */
:root{
  --bgTop: #f7fbff;
  --bgMid: #eef6ff;
  --bgBot: #e9f3ff;

  --ink: rgba(11, 26, 42, 0.88);
  --muted: rgba(11, 26, 42, 0.56);

  --glass: rgba(255,255,255,0.86);
  --glassSoft: rgba(255,255,255,0.72);
  --border: rgba(90, 120, 160, 0.18);

  --shadow: 0 18px 50px rgba(30, 70, 120, 0.15);
  --shadowSoft: 0 10px 22px rgba(20,52,84,0.10);

  --r: 22px;
}

/* ---------- Base ---------- */
*{ box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: linear-gradient(180deg, var(--bgTop) 0%, var(--bgMid) 35%, var(--bgBot) 100%);
}

/* ===============================
   Navigation (right-aligned)
================================ */
.wharf-nav{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.wharf-nav__inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.wharf-nav__link{
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border);
}

.wharf-nav__link:hover{
  background: rgba(255, 255, 255, 0.95);
}

.wharf-nav__link.active{
  background: rgba(120, 200, 255, 0.18);
  border-color: rgba(120, 200, 255, 0.35);
}

/* ===============================
   Page shell / card
================================ */
.wharf-shell{
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.wharf-card{
  width: min(980px, 96vw);
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.wharf-header{
  padding: 22px 22px 14px;
  border-bottom: 1px solid rgba(90,120,160,0.12);
}

.wharf-header h1{
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: rgba(20, 52, 84, 0.95);
}

.wharf-subtitle{
  margin: 8px 0 0;
  color: rgba(20, 52, 84, 0.70);
  line-height: 1.35;
}

/* ===============================
   Search bar (placeholder)
================================ */
.village-search{
  padding: 16px 22px 0;
}

.village-search__row{
  display: flex;
  align-items: center;
  gap: 10px;
}

.village-search__input{
  flex: 1;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(90,120,160,0.22);
  background: rgba(255,255,255,0.72);
  outline: none;
  font-size: 14px;
  color: var(--ink);
}

.village-search__input:focus{
  background: rgba(255,255,255,0.92);
  border-color: rgba(90,120,160,0.38);
  box-shadow: 0 0 0 4px rgba(120,200,255,0.18);
}

.village-search__btn{
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(90,120,160,0.22);
  background: rgba(255,255,255,0.55);
  color: rgba(11, 26, 42, 0.55);
  cursor: not-allowed;
}

.village-search__hint{
  margin-top: 8px;
  font-size: 12px;
  color: rgba(11, 26, 42, 0.56);
}

/* ===============================
   Map + villager panel layout
================================ */
.village-grid{
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  padding: 16px 22px 22px;
}

.village-map{
  border: 1px solid rgba(90,120,160,0.18);
  border-radius: 18px;
  background: rgba(255,255,255,0.55);
  box-shadow: var(--shadowSoft);
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.map-placeholder{
  height: 100%;
  min-height: 420px;
  display: grid;
  place-items: center;
  color: rgba(20, 52, 84, 0.60);
  font-weight: 700;
  letter-spacing: 0.2px;
}

.villager-panel{
  border: 1px solid rgba(90,120,160,0.18);
  border-radius: 18px;
  background: rgba(255,255,255,0.62);
  box-shadow: var(--shadowSoft);
  padding: 14px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.villager-panel h2{
  margin: 0 0 10px 0;
  font-size: 16px;
  color: rgba(20, 52, 84, 0.90);
}

#villagerList{
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#villagerList li{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(90,120,160,0.16);
  background: rgba(255,255,255,0.70);
  color: rgba(20, 52, 84, 0.86);
}

/* Scrollbar niceness */
#villagerList::-webkit-scrollbar{ width: 10px; }
#villagerList::-webkit-scrollbar-thumb{
  background: rgba(155,188,255,0.35);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.65);
}
#villagerList::-webkit-scrollbar-track{
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
}

/* Responsive */
@media (max-width: 900px){
  .village-grid{
    grid-template-columns: 1fr;
  }
  .villager-panel, .village-map{
    min-height: 320px;
  }
  .map-placeholder{ min-height: 320px; }
}
