/* =========================================================
   GoHereNow — Beach Theme (sun-fade + micro-animations)
   Elegant grid/flex scroll fix + beach list buttons
   ========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

:root{
  --bg-top: #bfe3ff;
  --bg-mid: #e8f6ff;
  --bg-bot: #fff6d9;

  --ink: #0b1020;
  --muted: #5c6a7a;

  --card-border: rgba(15, 23, 42, 0.12);

  --accent: #12b5c9;   /* ocean teal */
  --accent-2: #34d399; /* mint */
  --accent-3: #ffd166; /* sunshine */
  --accent-4: #ff8fab; /* coral */

  --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 6px 14px rgba(15, 23, 42, 0.08);

  --radius-xl: 22px;
  --radius-lg: 16px;
}

/* Micro-motions */
@keyframes floatIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes softPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(18,181,201,0.0); }
  50%     { box-shadow: 0 0 0 6px rgba(18,181,201,0.12); }
}

html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 15% -10%, #ffffff 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bot) 100%);
}

/* Shell */
.app-shell{
  max-width: 540px;
  margin: 10px auto 12px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  backdrop-filter: blur(6px);
}

/* Sun-fade header */
.app-header{
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(700px 260px at 100% -30%, rgba(255, 209, 102, 0.70) 0%, rgba(255, 209, 102, 0.0) 60%),
    radial-gradient(520px 220px at 10% -40%, rgba(255, 143, 171, 0.55) 0%, rgba(255, 143, 171, 0.0) 62%),
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.78) 70%, rgba(255,255,255,0.70) 100%);
}

.brand-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-bottom: 6px;
}
.brand-left{ display:flex; align-items:center; gap:10px; }
.brand-icon{
  width:40px; height:40px; border-radius:12px;
  box-shadow:0 3px 8px rgba(0,0,0,0.12);
}
.brand-title{
  margin:0; font-size:18px; letter-spacing:0.06em; font-weight:800;
}
.brand-sub{ margin:2px 0 0; font-size:12px; color:var(--muted); }
.brand-actions{ display:flex; align-items:center; gap:8px; }

.ghost-pill{
  appearance:none;
  border:1px solid rgba(15, 23, 42, 0.18);
  background:rgba(255,255,255,0.95);
  padding:7px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  color:#0f172a;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:transform .08s ease, box-shadow .22s ease;
  box-shadow:0 2px 6px rgba(15,23,42,0.06);
}
.ghost-pill:hover{ transform:translateY(-1px); box-shadow:0 6px 12px rgba(15,23,42,0.10); }

.pill-dot{
  width:8px; height:8px; border-radius:999px;
  background:var(--accent-2);
  box-shadow:0 0 0 3px rgba(52,211,153,0.18);
}

/* Wallet */
.wallet-row{
  margin-top:6px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.wallet-pill{
  padding:7px 12px; border-radius:999px;
  background:linear-gradient(90deg, rgba(18,181,201,0.12), rgba(52,211,153,0.10));
  border:1px solid rgba(18,181,201,0.25);
  font-weight:800; font-size:14px; color:#0f766e;
  animation:softPulse 2.8s ease-in-out infinite;
}
.wallet-status{ font-size:13px; color:var(--muted); }

/* Wallet action layout (Balance + Add $10 inline, Sign in below) */
.wallet-line{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
/* === Unified beach-style action pills (Add $10 + Sign In) === */

.wallet-topup,
.wallet-signin {
  /* keep your original "pill" footprint */
  padding: 6px 10px;
  font-weight: 900;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* match the appearance of the active "List" tab */
  background: linear-gradient(180deg, #ffffff, rgba(18,181,201,0.16));
  border: 1.5px solid rgba(18,181,201,0.95);
  color: #0f766e !important;
  box-shadow: 0 4px 10px rgba(15,23,42,0.08);
  transition: transform .08s ease, box-shadow .2s ease;
}

/* Hover lift (same micro-animation as tab.big:hover) */
.wallet-topup:hover,
.wallet-signin:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15,23,42,0.12);
}

/* Layout-specific differences */
.wallet-topup {
  /* sits next to Balance pill */
  flex-shrink: 0;
}

.wallet-signin {
  /* sits on its own line */
  width: 100%;
}

/* User greeting section (holds both greeting and logout) */
.user-greeting-section {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

/* User greeting - auto width when logged in */
.user-greeting {
  width: auto;
  min-width: 120px;
  padding: 6px 14px;
  font-weight: 900;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff, rgba(52,211,153,0.16));
  border: 1.5px solid rgba(52,211,153,0.95);
  color: #065f46 !important;
  box-shadow: 0 4px 10px rgba(15,23,42,0.08);
  font-size: 14px;
  transition: transform .08s ease, box-shadow .2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.user-greeting:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15,23,42,0.12);
}

/* Logout button */
.logout-btn {
  padding: 6px 12px;
  font-weight: 900;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff, rgba(239,68,68,0.08));
  border: 1.5px solid rgba(239,68,68,0.6);
  color: #7f1d1d !important;
  box-shadow: 0 4px 10px rgba(15,23,42,0.08);
  transition: transform .08s ease, box-shadow .2s ease;
  flex-shrink: 0;
  font-size: 13px;
}

.logout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15,23,42,0.12);
  background: linear-gradient(180deg, #ffffff, rgba(239,68,68,0.12));
}

/* BIG beach List/Map buttons */
.tab-row.big-tabs{
  margin-top: 10px;
  display:flex; gap:10px;
}
.tab.big{
  flex: 1;
  appearance:none;
  border:1px solid rgba(18,181,201,0.55);
  background: rgba(255,255,255,0.95);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .02em;
  cursor:pointer;
  box-shadow: 0 4px 10px rgba(15,23,42,0.08);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.tab.big:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15,23,42,0.12);
}
.tab.big.active{
  background: linear-gradient(180deg, #ffffff, rgba(18,181,201,0.16));
  border-color: rgba(18,181,201,0.95);
  color: #0f766e;
}

/* Main split view (scroll-safe grid) */
.app-main.split-view{
  padding: 10px 12px 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

/* List panel (scroll-safe flex) */
.list-panel{
  background: rgba(255,255,255,0.92);
  border:1px solid rgba(15,23,42,0.10);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 10px;

  display: flex;
  flex-direction: column;

  /* THIS is the real cap */
  height: 420px;       /* ~5 cards */
  max-height: 420px;

  min-height: 0;
}

.panel-title{
  font-size: 13px; font-weight: 800; color: var(--muted);
  margin: 2px 2px 8px;
}

/* Scrolling list window (~5 visible entries) */
.locations-scroll{
  /* Let it fill the capped panel */
  flex: 1 1 auto;
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  display:flex;
  flex-direction:column;
  gap: 10px;
  padding-right: 4px;

  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

/* Cards — beach fill + border */
.location-card{
  width: 100%;
  display: block;
  appearance:none;

  border: 1.5px solid rgba(18,181,201,0.55);
  background:
    linear-gradient(180deg, #ffffff 0%, rgba(255, 246, 217, 0.85) 100%);
  border-radius: var(--radius-lg);

  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform .08s ease, box-shadow .22s ease, border-color .22s ease;
  position: relative;
  min-height: 74px;
  animation: floatIn .35s ease both;
}
.location-card:hover{
  transform: translateY(-1px);
  border-color: rgba(18,181,201,0.9);
  box-shadow: 0 10px 18px rgba(15,23,42,0.12);
}
.location-card.selected{
  border-color: rgba(18,181,201,1);
  background:
    linear-gradient(180deg, #ffffff 0%, rgba(191, 227, 255, 0.75) 100%);
  box-shadow: 0 0 0 3px rgba(18,181,201,0.12), var(--shadow-card);
}

.location-name{
  font-size:16px;
  font-weight:800;
  margin-bottom:3px;

  /* ---- NEW: clamp long names ---- */
  display: -webkit-box;
  -webkit-line-clamp: 1;        /* change to 2 if you want two lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.location-addr{
  font-size:13px;
  color:var(--muted);
  line-height:1.25;
  padding-right:80px;

  /* ---- NEW: elegant long-text clamp ---- */
  display: -webkit-box;
  -webkit-line-clamp: 2;        /* clamp to 1 or 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.distance-pill{
  position:absolute; right:12px; top:50%; transform:translateY(-50%);
  min-width:64px; text-align:center; padding:5px 9px;
  font-size:12px; font-weight:900; border-radius:999px;
  background:rgba(18,181,201,0.12); color:#0f766e;
  border:1px solid rgba(18,181,201,0.25);
  white-space:nowrap;
}
.distance-pill.subtle{
  background:rgba(15,23,42,0.05);
  color:#0f172a;
  border-color:rgba(15,23,42,0.10);
}

/* Map */
.map-panel{ display:flex; flex-direction:column; gap:8px; min-height: 0; }

/* ✅ RESTORED: identical styling for old (.map-container) and new (.map-canvas) */
.map-container,
.map-canvas{
  width:100%;
  height:36vh;        /* was 48vh in very early versions; keep your updated size */
  min-height:260px;   /* optional: reduce a bit for smaller phones */
  border-radius: var(--radius-xl);
  overflow:hidden;
  border:1px solid rgba(15,23,42,0.12);
  box-shadow: var(--shadow-card);
  background:#eaf7ff;
  animation: floatIn .4s ease both;
}

.map-overlay-hint{
  font-size:13px; color:var(--muted); text-align:center;
}

/* Empty state */
.empty-state{ text-align:center; color:var(--muted); font-size:14px; padding:18px 10px; }
.hidden{display:none;}

/* Footer */
.app-footer{
  padding:10px 12px 12px;
  border-top:1px solid rgba(15,23,42,0.08);
  background:rgba(255,255,255,0.90);
}
.primary-btn{
  width:100%; appearance:none; border:none;
  padding:12px 14px; border-radius:14px;
  font-size:16px; font-weight:900; color:#0b1020;
  background:linear-gradient(90deg, var(--accent-3), #fff0a8);
  box-shadow:0 6px 14px rgba(255, 209, 102, 0.45);
  cursor:pointer; transition:transform .08s ease, filter .22s ease;
}
.primary-btn:disabled{ opacity:0.55; cursor:not-allowed; filter:grayscale(0.3); }
.primary-btn:hover{transform:translateY(-1px);}
.footer-row{
  margin-top:8px; display:flex; justify-content:center; gap:8px; font-size:14px;
}
.footer-link{ color:#0f766e; font-weight:800; text-decoration:none; }
.footer-link:hover{text-decoration:underline;}
.footer-divider{color:var(--muted);}


/* =========================================================
   Partner Apply Form (integrated from partner-apply)
   Uses beach theme variables + spacing
   ========================================================= */

.partner-apply .form-panel{
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 16px;
  padding-bottom: 24px; /* extra breathing room even on non-iOS */
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: floatIn .35s ease both;
}

.partner-apply .form-title{
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .02em;
  margin: 0;
}

.partner-apply .form-sub{
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.45;
}

.partner-apply .status-line{
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(15,23,42,0.04);
}

.partner-apply .status-line.ok{
  border-color: rgba(52, 211, 153, 0.6);
  background: rgba(52, 211, 153, 0.12);
  color: #065f46;
  font-weight: 800;
}

.partner-apply .status-line.err{
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.10);
  color: #7f1d1d;
  font-weight: 700;
}

.partner-apply .form-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.partner-apply .form-grid > div{
  min-width: 0; /* prevents any child from shrinking oddly */
}

.partner-apply .form-label{
  display:block;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  margin: 0 0 6px 2px;
}

.partner-apply .form-input,
.partner-apply .form-textarea{
  width: 100%;
  display: block;
  min-width: 0;
  border-radius: 14px;
  border: 1.5px solid rgba(18,181,201,0.55);
  background: #fff;
  padding: 12px 14px;
  font-size: 17px;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
  box-shadow: 0 2px 6px rgba(15,23,42,0.04);
}

.partner-apply .form-input:focus,
.partner-apply .form-textarea:focus{
  border-color: rgba(18,181,201,0.95);
  box-shadow: 0 0 0 3px rgba(18,181,201,0.12);
}

.partner-apply .form-textarea{
  resize: vertical;
  min-height: 100px;
}

.partner-apply .help{
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* Partner button (same size as primary, different beach color) */
.partner-btn{
  display:block;
  text-align:center;
  text-decoration:none;
  margin-top:10px;
  background: linear-gradient(90deg, rgba(18,181,201,0.18), rgba(191, 227, 255, 0.9));
  color:#0b1020;
  box-shadow:0 6px 14px rgba(18,181,201,0.25);
}

/* Footer legal links on their own lines */
.footer-legal{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  font-size:14px;
}

/* Responsive */
@media (max-width: 560px){
  .app-shell{ margin:0; border-radius:0; }
  .brand-title{ font-size:16px; }
  .list-panel{
    height: 360px;
    max-height: 360px;
  }
  .locations-scroll{
    flex: 1 1 auto;
    min-height: 0;
  }
    .partner-apply .form-grid.two{
    grid-template-columns: 1fr 1fr;
  }
  
  .location-addr{ padding-right:72px; }
  .distance-pill{ min-width:58px; font-size:11px; }
   .app-shell {
    padding-bottom: 40px;
  }
}