/*
Theme Name: AquaCul
Theme URI: https://culabanwaterstation.com
Description: AquaCul – Water Refilling Station App
Author: AquaCul
Version: 1.0.0
*/

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --blue: #0A6EBD;
  --blue-dark: #084F8A;
  --blue-light: #3A9FDD;
  --cyan-bg: #E8F7FF;
  --green: #2ECC71;
  --green-dark: #27AE60;
  --dark: #1A1A2E;
  --gray: #6B7280;
  --light-gray: #F3F4F6;
  --white: #fff;
  --danger: #EF4444;
  --orange: #F59E0B;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(10,110,189,.13);
}

/* ── Base Reset ────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--cyan-bg);
  color: var(--dark);
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }
.screen { display: none; flex-direction: column; min-height: 100vh; }
.screen.active { display: flex; }

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  background: var(--blue);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(10,110,189,.2);
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar h2 { font-family: 'Syne', sans-serif; color: #fff; font-size: 1.25rem; }
.topbar-sub { color: rgba(255,255,255,.7); font-size: .78rem; margin-top: 1px; }
.topbar-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  padding: 0 !important;
  flex-shrink: 0;
}
.topbar-icon svg { width: 18px; height: 18px; }

/* ── Bottom Nav ────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: #fff;
  display: flex;
  border-top: 1px solid #E5E7EB;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 8px; cursor: pointer; border: none; background: none;
  gap: 3px; color: var(--gray); font-size: .68rem;
  font-family: 'Nunito', sans-serif; font-weight: 700; transition: color .2s;
}
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; }
.nav-item.active { color: var(--blue); }
.nav-item:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  width: 100%; padding: 15px; border-radius: 50px; border: none;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%);
  color: #fff; font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 800;
  cursor: pointer; box-shadow: 0 4px 16px rgba(10,110,189,.3); transition: transform .15s;
}
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-secondary {
  width: 100%; padding: 14px; border-radius: 50px; border: 2px solid var(--blue);
  background: transparent; color: var(--blue);
  font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 800;
  cursor: pointer; transition: .15s;
}
.btn-secondary:active { background: var(--cyan-bg); }
.btn-free {
  width: 100%; padding: 15px; border-radius: 50px; border: none;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff; font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 800;
  cursor: pointer; box-shadow: 0 4px 16px rgba(46,204,113,.3); transition: transform .15s;
  margin-bottom: 10px;
}
.btn-free:active { transform: scale(.98); }
.btn-fb {
  width: 100%; max-width: 380px; padding: 14px; border-radius: 50px; border: none;
  background: #1877F2; color: #fff;
  font-family: 'Nunito', sans-serif; font-size: .95rem; font-weight: 800;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 10px; text-decoration: none; box-shadow: 0 4px 16px rgba(24,119,242,.3);
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label { font-size: .82rem; font-weight: 700; color: var(--gray); margin-bottom: 6px; display: block; }
.form-input {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 2px solid var(--light-gray);
  font-family: 'Nunito', sans-serif; font-size: .95rem; color: var(--dark);
  transition: border-color .2s; outline: none;
}
.form-input:focus { border-color: var(--blue); }
.payment-options { display: flex; gap: 8px; }
.payment-chip {
  flex: 1; padding: 11px 6px; border-radius: 10px; border: 2px solid var(--light-gray);
  background: var(--light-gray); font-family: 'Nunito', sans-serif; font-size: .8rem;
  font-weight: 700; color: var(--gray); cursor: pointer; text-align: center; transition: .15s;
}
.payment-chip.active { background: var(--cyan-bg); border-color: var(--blue); color: var(--blue); }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 500; align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; animation: fadeIn .2s; }
.modal {
  background: #fff; border-radius: 24px 24px 0 0; padding: 24px 20px 40px;
  width: 100%; max-width: 430px; animation: slideUp .25s ease;
  max-height: 90vh; overflow-y: auto;
}
.modal-handle { width: 40px; height: 4px; background: #E5E7EB; border-radius: 4px; margin: 0 auto 20px; }
.modal-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 18px; }

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-80px);
  background: var(--dark); color: #fff; padding: 12px 22px; border-radius: 50px;
  font-size: .88rem; font-weight: 700; z-index: 1000; transition: transform .3s ease;
  white-space: nowrap; max-width: 90%; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Section ───────────────────────────────────────────────── */
.section { padding: 20px 20px 0; }
.section-title { font-size: .8rem; font-weight: 800; color: var(--gray); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 12px; }

/* ── Status Badges ─────────────────────────────────────────── */
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: .7rem; font-weight: 800; }
.status-pending { background: #FEF3C7; color: #D97706; }
.status-confirmed { background: #DBEAFE; color: #1D4ED8; }
.status-delivery { background: #EDE9FE; color: #7C3AED; }
.status-delivered { background: #D1FAE5; color: #059669; }
.status-cancelled { background: #FEE2E2; color: #DC2626; }

/* ── Empty State ───────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 30px; }
.empty-state .emoji { font-size: 3.5rem; }
.empty-state h3 { font-size: 1.1rem; font-weight: 800; margin: 12px 0 6px; }
.empty-state p { color: var(--gray); font-size: .88rem; }

/* ── Divider ───────────────────────────────────────────────── */
.divider { width: 100%; display: flex; align-items: center; gap: 12px; color: var(--gray); font-size: .85rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--light-gray); }

/* ── Order Tracking ────────────────────────────────────────── */
.order-track { display: flex; flex-direction: column; gap: 0; margin: 16px 0; }
.track-step { display: flex; gap: 14px; align-items: flex-start; }
.track-dot-col { display: flex; flex-direction: column; align-items: center; }
.track-dot { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--light-gray); background: #fff; flex-shrink: 0; }
.track-dot.done { background: var(--green); border-color: var(--green); }
.track-dot.active { background: var(--blue); border-color: var(--blue); animation: pulse 1.5s infinite; }
.track-line { width: 2px; height: 28px; background: var(--light-gray); }
.track-line.done { background: var(--green); }
.track-info { padding-bottom: 24px; }
.track-label { font-weight: 700; font-size: .9rem; }
.track-sub { font-size: .75rem; color: var(--gray); margin-top: 2px; }

/* ── Spinner ───────────────────────────────────────────────── */
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }

/* ── Login Gate ────────────────────────────────────────────── */
.login-gate { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 0 30px 100px; text-align: center; gap: 14px; min-height: calc(100vh - 60px); }
.login-gate h2 { font-family: 'Syne', sans-serif; font-size: 1.5rem; color: var(--dark); }
.login-gate p { color: var(--gray); font-size: .9rem; line-height: 1.6; }
.login-gate .btn-primary { width: 100%; max-width: 380px; }
.login-gate .nsl-container { width: 100% !important; max-width: 380px !important; margin: 0 auto !important; }
.login-gate .nsl-button { width: 100% !important; border-radius: 50px !important; padding: 14px 20px !important; font-family: 'Nunito', sans-serif !important; font-size: .95rem !important; font-weight: 800 !important; justify-content: center !important; margin: 0 !important; }
.login-gate .nsl-button-facebook { background: #1877F2 !important; }
.login-gate .nsl-container-block a:not(.nsl-button) { display: none !important; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(10,110,189,.4); } 50% { box-shadow: 0 0 0 8px rgba(10,110,189,0); } }
