/* ===== THEME VARIABLES =====
   Default: light theme
   JS can toggle data-theme on <body> to switch modes.
*/
:root,
body[data-theme="light"] {
  --accent: #5a6981;
  --muted: #6b7280;
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #111827;
  --border: #eef2f7;
  --input-border: #e6e9ef;
  --input-bg: #ffffff;
  --shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  --radius: 12px;
}

body[data-theme="dark"] {
  --accent: #34d399; /* fresh emerald green */
  --muted: #94a3b8;
  --bg: #0f1a17;
  --card: #1a2522;
  --text: #f3f4f6;
  --border: #2d3a36;
  --input-border: #33423d;
  --input-bg: #1a2522;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}




body[data-theme="gray"] {
  --accent: #1f2937; /* dark gray accent */
  --muted: #4b5563;  /* slightly darker muted text */
  --bg: #e5e7eb;     /* light gray background */
  --card: #ffffff;
  --text: #111827;
  --border: #d1d5db;
  --input-border: #cbd5e1;
  --input-bg: #ffffff;
  --shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

/* ===== GLOBAL STYLES ===== */
* {
  box-sizing: border-box;
}
.col_teme .btn {
    width: 13px !important;
    height: 18px;
    border-radius: 50%;
    border: 0px;
    padding: 10px 10px;
}
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.25s ease, color 0.25s ease;
}

/* ===== LAYOUT ===== */
.wrap {
  display: flex;
  height: 100vh;
  gap: 18px;
  padding: 18px;
}

.panel {
  width: 380px;
  min-width: 300px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.map-wrap {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
aside.panel {
  position: fixed;
  z-index: 99;
  top: 55px;
  left: 9px;
  bottom: 9px;
  width: 380px;
  min-width: 300px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* keep panel tidy */
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.wrap {
    display: flex;
    height: 100vh;
    gap: 18px;
padding:0px;
}
/* ===== HEADER ===== */
.header {
  padding: 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

/* ===== CONTROLS ===== */
.controls {
  padding: 12px 18px;
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.controls .row {
  display: flex;
  gap: 8px;
}

input[type="text"],
select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

input[type="text"]::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 6px 9px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(3, 102, 214, 0.12);
  flex-grow: 1;
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}

.btn.active-theme,
.btn.ghost.active-theme {
  background: var(--accent);
  color: #fff;
}

/* ===== FILE UPLOAD ===== */
.file-upload-btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  text-align: center;
}

.file-upload-btn input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* ===== SLIDER & VIEW CONTROLS ===== */
.radius-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radius-value {
  font-weight: 700;
  color: var(--accent);
  min-width: 44px;
  text-align: center;
}

.view-toggle {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}

/* ===== STORE LIST & GRID ===== */
#list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  gap: 12px;
  scroll-behavior: smooth;
}
#list::-webkit-scrollbar {
  width: 6px;
}

#list::-webkit-scrollbar-track {
  background: transparent;
}

#list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

#list::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ===== SLIM SCROLLBAR (Firefox) ===== */
#list {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.store {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  transition: transform 0.18s, box-shadow 0.18s, background 0.2s ease;
  cursor: pointer;
}

.store:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.store img {
  width: 86px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.meta {
  flex: 1;
}

.meta h3 {
  margin: 0;
  font-size: 15px;
  color: var(--accent);
}

.meta p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.meta .small {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 6px;
}

/* ===== GRID MODE ===== */
.grid .store {
  flex-direction: column;
  align-items: flex-start;
}

.grid .store img {
  width: 100%;
  height: 140px;
  border-radius: 8px;
}

/* ===== DIRECTIONS PANEL ===== */
.directions-panel {
  position: absolute;
  right: 28px;
  top: 28px;
  width: 340px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow);
  z-index: 99;
  max-height: 70vh;
  overflow: auto;
  display: none;
}

.directions-panel.open {
  display: block;
}

.directions-panel h3 {
  color: var(--accent);
}

/* ===== MAP ===== */
#map {
  width: 100%;
  height: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .wrap {
    flex-direction: column;
    padding: 12px;
  }

  .panel {
    width: 100%;
    height: auto;
    min-height: 260px;
  }

  .map-wrap {
    height: 60vh;
  }

  .directions-panel {
    right: 12px;
    top: auto;
    bottom: 12px;
    width: calc(100% - 24px);
  }

aside.panel {
    position: fixed;
    top: 269px;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 71vh;
    border-radius: 16px 16px 0 0;
}

  #list {
    max-height: 100%;
    padding-bottom: 80px; /* prevent overlap with bottom UI */
  }
  div#map {
    height: 35vh;
}
  .wrap {
    flex-direction: column;
    padding:0px;
  }
  .header {
    display: none;
}
}
