/* =====================================================================
 * ONHYM Mining Map — premium light theme (v2)
 * Pure CSS, no preprocessor.  Designed to blend natively in WordPress.
 * ===================================================================== */

:root {
  /* ONHYM brand */
  --c-50:  #f3f7fc;
  --c-100: #e3ecf6;
  --c-200: #c8d8ec;
  --c-300: #9fbcdc;
  --c-400: #6f9bca;
  --c-500: #3f7bb6;
  --c-600: #235e9a;
  --c-700: #194878;
  --c-800: #102e54;
  --c-900: #0a1d38;
  --c-950: #06111f;

  /* Neutral surface palette */
  --surface:        rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-soft:   rgba(255, 255, 255, 0.55);
  --border-soft:    rgba(15, 35, 65, 0.08);
  --border-strong:  rgba(15, 35, 65, 0.14);
  --text-strong:    #0f2341;
  --text-soft:      #5c6f88;
  --text-muted:     #8a99b1;

  /* Effects */
  --shadow-glass: 0 6px 24px rgba(15, 35, 65, .08), 0 1px 2px rgba(15, 35, 65, .04);
  --shadow-soft:  0 2px 10px rgba(15, 35, 65, .06);
  --shadow-pop:   0 14px 40px rgba(15, 35, 65, .12);

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* The plugin should only style ITSELF — never the host body. */
.mp-app, .mp-app * { box-sizing: border-box; }

button { font-family: inherit; }

/* ----------- Mount-point container ----------- */
/* Transparent — blends with the WordPress section. */
.mp-app {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  overflow: hidden;
  background: transparent;
  color: var(--text-strong);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  border-radius: 14px;
  isolation: isolate;
}

/* Wrapper coming from templates/map.php — keep it integrated, no dark box. */
.onhym-mining-map-wrapper {
  background: transparent;
  position: relative;
}

/* Optional dark mode (toggled via toolbar). Lighter than before. */
.mp-app.is-dark { color: #e9eef7; }

/* ----------- Scroll thin ----------- */
.scroll-thin::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-thin::-webkit-scrollbar-track { background: transparent; }
.scroll-thin::-webkit-scrollbar-thumb {
  background: rgba(15, 35, 65, .12);
  border-radius: 9999px;
}
.scroll-thin::-webkit-scrollbar-thumb:hover { background: rgba(15, 35, 65, .25); }

/* ----------- Inline icon wrapper ----------- */
.mp-icon { display: inline-flex; line-height: 0; }
.mp-icon svg { display: block; stroke-width: 1.6; }

/* ----------- Generic icon button ----------- */
.mp-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0;
  background: transparent; border: 0; border-radius: 8px;
  color: inherit; cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.mp-icon-btn:hover { background: rgba(15, 35, 65, .06); color: var(--c-700); }
.mp-icon-btn.small { width: 22px; height: 22px; border-radius: 6px; }
.is-dark .mp-icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ----------- Title badge ----------- */
.mp-title-badge {
  position: absolute; top: 14px; left: 14px; z-index: 30;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--surface-strong);
  color: var(--text-strong);
  border-radius: 9999px;
  box-shadow: var(--shadow-glass);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.mp-title-logo {
  position: relative; width: 30px; height: 30px;
  border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c-400), var(--c-600) 60%, var(--c-800));
  box-shadow: inset 0 1px 1px rgba(255,255,255,.25), 0 2px 6px rgba(15,35,65,.18);
}
.mp-title-logo svg { color: #fff; }
.mp-title-pulse {
  position: absolute; inset: -3px; border-radius: 9999px;
  background: rgba(63, 123, 182, .22);
  animation: pulseRing 2.4s ease-out infinite;
}
.mp-title-text { display: flex; flex-direction: column; line-height: 1.15; }
.mp-title-eyebrow {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.mp-title-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -.005em;
}

@keyframes pulseRing {
  0%   { transform: scale(.7); opacity: .7; }
  80%  { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* ----------- Toolbar (right side) ----------- */
.mp-toolbar {
  position: absolute; right: 14px; top: 50%; z-index: 20;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px;
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.mp-toolbar-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  border: 0;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.mp-toolbar-btn:hover {
  background: var(--c-50);
  color: var(--c-700);
}
.mp-toolbar-btn.is-active {
  background: var(--c-600);
  color: #fff;
  box-shadow: 0 4px 12px rgba(35, 94, 154, .35);
}
.mp-toolbar-sep {
  height: 1px; width: 22px;
  margin: 4px auto;
  background: var(--border-soft);
}
.is-dark .mp-toolbar { background: rgba(15, 30, 55, .82); border-color: rgba(255,255,255,.08); }
.is-dark .mp-toolbar-btn { color: #c8d3e3; }
.is-dark .mp-toolbar-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.is-dark .mp-toolbar-sep { background: rgba(255,255,255,.08); }

/* ----------- Bottom action pills ----------- */
.mp-bottom-actions {
  position: absolute; bottom: 18px; left: 50%; z-index: 20;
  transform: translateX(-50%);
  display: inline-flex; gap: 4px;
  padding: 4px;
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
  border-radius: 9999px;
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.mp-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px; font-weight: 500;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.mp-pill:hover { background: var(--c-50); color: var(--c-700); }
.mp-pill.is-active {
  background: var(--c-700);
  color: #fff;
  box-shadow: 0 4px 12px rgba(25, 72, 120, .35);
}
.mp-pill .mp-icon { color: currentColor; opacity: .85; }
.is-dark .mp-bottom-actions { background: rgba(15, 30, 55, .82); border-color: rgba(255,255,255,.08); }
.is-dark .mp-pill { color: #c8d3e3; }
.is-dark .mp-pill:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ----------- Coordinate readout ----------- */
.mp-coord {
  position: absolute; bottom: 18px; left: 18px; z-index: 10;
  display: none; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--surface-strong);
  color: var(--text-soft);
  font-size: 11px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  border: 1px solid var(--border-soft);
  border-radius: 9999px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mp-coord-zoom {
  margin-left: 4px;
  padding: 1px 6px;
  background: var(--c-50);
  color: var(--c-700);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 4px;
  font-weight: 600;
}
@media (min-width: 768px) { .mp-coord { display: inline-flex; } }
.is-dark .mp-coord {
  background: rgba(15, 30, 55, .82); color: #d6e0ef;
  border-color: rgba(255,255,255,.08);
}
.is-dark .mp-coord-zoom { background: rgba(255,255,255,.08); color: #fff; }

/* ----------- Loading overlay ----------- */
.mp-loading {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
  transition: opacity .5s ease;
}
.mp-loading.is-hidden { opacity: 0; }
.mp-loading-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 22px 28px;
  background: var(--surface-strong);
  color: var(--text-strong);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-pop);
}
.mp-spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--c-200);
  border-top-color: var(--c-600);
  border-radius: 9999px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.mp-loading-text {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}
