/* style.css */

:root {
    /* ========= BRAND ========= */
    --brand-yellow: #f7c600;
    --brand-dark: #2b2b2b;
    --brand-light: #ffffff;

    /* ========= BACKGROUNDS ========= */
    --bg-main: #ffffff;
    --bg-soft: #f4f4f4;
    --bg-nav: rgba(255, 255, 255, 0.95);

    /* ========= TEXT ========= */
    --text-main: #2b2b2b;
    --text-muted: #888;
    --font-main: 'Segoe UI', sans-serif;
    --color-success: #1b8f3a;
    --color-danger: #b00020;
    --color-warning: #f7c600;

    /* ========= SPACING ========= */
    --space-xxs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 20px;
    --space-xl: 24px;

    /* ========= RADIUS ========= */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    /* ========= SIZES ========= */
    --app-max-width: 400px;
    --bottom-nav-height: 70px;

    /* ========= BORDERS ========= */
    --border-soft: 1px solid #eee;

    /* ========= SHADOWS ========= */
    --shadow-soft: 0 -2px 10px rgba(0, 0, 0, 0.08);

    /* ========= Z-INDEX ========= */
    --z-loader: 10000;
    --z-header: 1000;
    --z-nav: 1000;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
    overscroll-behavior-y: none;
}

/* ===== BODY (NO SCROLL) ===== */
body {
    width: 100%;
    min-height: 100dvh;
    /* IMPORTANT: stops address-bar shake */
    overflow-x: hidden;
    overflow-y: auto;
    background-color: var(--bg-main);
    font-family: var(--font-main);
}

.location-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

/* ===============================
   LOCATION LABEL TRANSITION
================================ */

.location-label {
  display: inline-block;
  will-change: opacity, transform;
}

.location-label.fade-out {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.location-label.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}



/* ===== APP CONTAINER (SCROLLS) ===== */
.app-container {
    max-width: var(--app-max-width);
    margin: 0 auto;
    min-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-main);
}

/* ===== LOADER ===== */
body.loading {
    overflow: hidden;
}

body.loading .app-container {
    visibility: hidden;
}

#loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: var(--z-loader);
}

.loader-logo {
    width: 120px;
    aspect-ratio: 1 / 1;
    margin-bottom: 20px;
    border-radius: 15px;
    animation: pulse 1.4s ease-in-out infinite;
}


@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.12);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

.back-btn {
    background: none;
    border: none;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    color: #111;
    cursor: pointer;
}




/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    background: var(--bg-nav);
    display: flex;
    justify-content: space-around;
    align-items: center;
    transform: translate3d(0, 0, 0);
    border-top: var(--border-soft);
    box-shadow: var(--shadow-soft);
    z-index: var(--z-nav);
}

.bottom-nav a {
    text-decoration: none;
    font-size: 18px;
    color: var(--text-muted);
}

.bottom-nav a.active {
    color: var(--brand-yellow);
}

/* ===============================
   BOTTOM NAV ICONS
================================ */

/* icon baseline */
.bottom-nav a::before {
    display: inline-block;
    margin-right: 6px;
    font-size: 14px;
    line-height: 1;
    vertical-align: middle;
}

/* Map */
.bottom-nav a[href*="map"]::before {
    content: "🗺️";
}

/* List / Home */
.bottom-nav a[href*="index"]::before,
.bottom-nav a[href*="home"]::before {
    content: "📋";
}

/* About */
.bottom-nav a[href*="about"]::before {
    content: "ℹ️";
}

/* ===============================
   ICON MICRO ANIMATION
================================ */

@keyframes navIconLift {
    0% {
        transform: translateY(2px);
        opacity: 0.6;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* animate icon only when active */
.bottom-nav a.active::before {
    animation: navIconLift 0.25s ease-out;
}

/* --- Skeleton cards (homepage) --- */
.skeleton-wrap { display: block; }

.skeleton-card {
  border-radius: 18px;
  padding: 14px;
  margin: 10px 0;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.05);
  overflow: hidden;
  position: relative;
}

.skel-row { height: 12px; border-radius: 999px; background: rgba(0,0,0,0.06); margin: 10px 0; }
.skel-row.w60 { width: 60%; }
.skel-row.w40 { width: 40%; }
.skel-row.w80 { width: 80%; }
.skel-row.w30 { width: 30%; }

.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.55),
    transparent
  );
  animation: skel-shimmer 1.1s infinite;
}

@keyframes skel-shimmer {
  100% { transform: translateX(100%); }
}