/* =========================================================
   Protest Monitoring — Light PWA Theme (Modern, Mobile-First)
   Palette:
     Primary: #45499B
     Accent:  #FA8A1A
     Ink:     #1D1D1D
     Surface: #FFFFFF
     BG:      #F5F5F5
     Muted:   #4D4D4D
   ========================================================= */

/* ---------- CSS Variables ---------- */
:root{
  --bg: #F5F5F5;
  --surface: #FFFFFF;
  --surface-2: #FBFBFB;
  --ink: #1D1D1D;
  --muted: #4D4D4D;

  --primary: #45499B;
  --accent: #FA8A1A;

  --border: rgba(29,29,29,.12);
  --border-strong: rgba(29,29,29,.18);

  --shadow-soft: 0 6px 18px rgba(29,29,29,.08);
  --shadow: 0 14px 34px rgba(29,29,29,.12);

  --r-10: 10px;
  --r-12: 12px;
  --r-14: 14px;
  --r-16: 16px;
  --r-18: 18px;

  --tap: 44px;
  --maxw: 980px;

  --header-h: 10px;
  --pad: 16px;

  --focus: 0 0 0 4px rgba(69,73,155,.14);
}

/* ---------- Base Reset ---------- */
*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}

/* ---------- Typography ---------- */
h1,h2,h3{
  letter-spacing: -.2px;
  margin: 0 0 10px;
}
h1{ font-size: 22px; }
h2{ font-size: 20px; }
h3{ font-size: 16px; }

p{ margin: 0 0 10px; line-height: 1.45; }

.small{ font-size: 13px; }
.muted{ color: var(--muted); opacity: .88; }

a{ color: var(--primary); text-decoration:none; }
a:hover{ opacity:.92; }

/* ---------- Layout ---------- */
.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px;
  padding-top: calc(var(--header-h));
}

.section{ margin-top: 18px; }

/* ---------- Header (Sticky Topbar) ---------- */
.topbar{
    position: sticky;
    top: 0;
    z-index: 60;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--pad);
    background: rgba(245, 245, 245, .86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding-top: 10px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.brand .logo{
    width: 70px;
    height: 70px;
   
}

.brand a{
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.actions{
  display:flex;
  align-items:center;
  gap: 10px;
}

/* Menu button */
.iconbtn{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.92);
  display:grid;
  place-items:center;
  cursor:pointer;
  box-shadow: 0 6px 14px rgba(29,29,29,.06);
  transition: transform .12s ease, filter .12s ease;
}
.iconbtn:hover{ transform: translateY(-1px); }
.iconbtn:active{ transform: translateY(0); }
.iconbtn svg{ width: 20px; height: 20px; fill: var(--ink); opacity:.9; }

/* ---------- Mobile Menu Sheet ---------- */
.menu-sheet[hidden]{ display:none !important; }

.menu-sheet{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(29,29,29,.30);
  display: grid;
  place-items: end center;
  padding: 16px;
}

.menu-card{
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid rgba(29,29,29,.12);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 20px 60px rgba(29,29,29,.22);
}

.menu-link{
  display:block;
  padding: 12px 12px;
  border-radius: var(--r-14);
  border: 1px solid transparent;
  color: var(--ink);
  font-weight: 900;
}
.menu-link:hover{
  background: rgba(69,73,155,.06);
  border-color: rgba(69,73,155,.14);
}

/* ---------- Protest Context Tabs (Sticky under header) ---------- */
.subnav{
  position: sticky;
  top: var(--header-h);
  z-index: 55;
  margin-top: 12px;
  background: rgba(245,245,245,.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--r-16);
  padding: 6px;
  display:flex;
  gap: 6px;
}

.subnav a{
  flex: 1 1 0;
  text-align:center;
  padding: 10px 8px;
  border-radius: var(--r-12);
  font-weight: 900;
  color: var(--muted);
  border: 1px solid transparent;
}

.subnav a:hover{
  background: rgba(69,73,155,.06);
  color: var(--ink);
}

.subnav a.active{
  background: rgba(69,73,155,.12);
  color: var(--primary);
  border-color: rgba(69,73,155,.18);
}

/* ---------- Cards / Lists ---------- */
.card{
  border: 1px solid var(--border);
  border-radius: var(--r-16);
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card + .card{ margin-top: 12px; }

.cardlist{
  display:grid;
  gap: 12px;
  margin-top: 12px;
}

.row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
}

.hub{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin: 12px 0;
}

hr{
  border:none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

/* ---------- Badges / Pills ---------- */
.pill{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  background: rgba(250,138,26,.16);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(250,138,26,.28);
}

/* ---------- Forms ---------- */
.field{
  margin: 10px 0;
  display:flex;
  flex-direction:column;
  gap: 6px;
}

label{
  font-weight: 900;
  color: var(--ink);
  font-size: 13px;
}

input, select, textarea{
  border-radius: var(--r-14);
  border: 1px solid var(--border-strong);
  padding: 12px 12px;
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
  transition: box-shadow .12s ease, border-color .12s ease, background .12s ease;
  font-size: 16px;
  font-weight: 500;
}

textarea{ min-height: 92px; resize: vertical; }

input:focus, select:focus, textarea:focus{
  border-color: rgba(69,73,155,.55);
  box-shadow: var(--focus);
  background: var(--surface);
}

input::placeholder, textarea::placeholder{ color: rgba(77,77,77,.7); }

fieldset{
  border: 1px solid var(--border);
  border-radius: var(--r-16);
  padding: 12px;
  background: var(--surface);
}
legend{
  font-weight: 900;
  padding: 0 8px;
  color: var(--ink);
}

/* Radio/checkbox groups (your Django fields render these) */
.option-row{
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  margin: 8px 0;
  background: var(--surface);
}
.option-row:hover{
  border-color: rgba(69,73,155,.20);
  box-shadow: 0 8px 18px rgba(29,29,29,.06);
}

/* ---------- Buttons ---------- */
button, .btn{
  min-height: var(--tap);
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 14px;
  border-radius: var(--r-14);
  cursor: pointer;
  font-weight: 900;
  letter-spacing: .2px;
  box-shadow: 0 12px 22px rgba(69,73,155,.18);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

button:hover, .btn:hover{
  filter: brightness(1.02);
  transform: translateY(-1px);
}
button:active, .btn:active{ transform: translateY(0); }

.btn.secondary{
  background: rgba(250,138,26,.14);
  color: var(--ink);
  border: 1px solid rgba(250,138,26,.32);
  box-shadow: none;
}

.btn.ghost{
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn.ghost:hover{
  background: rgba(69,73,155,.06);
  border-color: rgba(69,73,155,.16);
}

/* Make buttons fit nicely in hubs */
.hub .btn, .hub button{ flex: 0 0 auto; }

/* ---------- Messages ---------- */
.messages{
  margin-bottom: 12px;
  display:grid;
  gap: 10px;
}
.msg{
  border: 1px solid rgba(69,73,155,.20);
  background: rgba(69,73,155,.08);
  color: var(--ink);
  border-radius: var(--r-16);
  padding: 12px 12px;
  font-weight: 800;
}

/* ---------- Tables (if you have any later) ---------- */
table{
  width:100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-16);
  overflow: hidden;
}
th, td{
  text-align:left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
th{ font-weight: 900; color: var(--muted); background: rgba(245,245,245,.9); }
tr:last-child td{ border-bottom:none; }

/* ---------- Map container helper ---------- */
#map{
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

/* ---------- Images / Media cards ---------- */
img, video{
  max-width: 100%;
  border-radius: var(--r-14);
}

/* ---------- Small polish ---------- */
code, pre{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
pre{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-16);
  padding: 12px;
  overflow:auto;
}

/* Desktop spacing tweaks */
@media (min-width: 920px){
  .container{ padding-left: 18px; padding-right: 18px; }
  h1{ font-size: 24px; }
}


/* ===== Protest Detail (Minimal) ===== */
.protest-min{
  max-width: 720px;
  margin: 20px auto 0;
  text-align: center;
}
.protest-title{
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -.3px;
}
.protest-meta{
  margin: 0 0 14px;
  font-weight: 800;
}
.protest-desc{
  margin: 0;
  line-height: 1.5;
  color: var(--ink);
  opacity: .92;
}

/* ===== Floating Action Triangle (Centered, Inverted) ===== */
/* Container for all FABs */
.fab-container {

  margin-top:25px;

  display: flex;
  flex-direction: column;  /* Stack vertically */
  gap: 25px;  /* Add space between each button */
  align-items: center;  /* Center the buttons horizontally */
  z-index: 999;  /* Ensure it's above other content */
}

/* Button styles for FAB */
.fab-btn {
  background-color: var(--primary);
  color: white;
  padding: 20px;
  font-size: 16px;
  text-align: center;
  border-radius: 10px;
  text-decoration: none;
  width: 250px;  /* Make buttons consistent width */
  text-transform: uppercase;
  display: block;  /* Make them block-level so they take up the full width */
  box-sizing: border-box;
  font-weight: bold;
  transition: background-color 0.3s;
}

.fab-btn:hover {
  background-color: #333;  /* Darker color on hover */
}







/* Form reset */
.fab-form{ margin: 0; }
.fab-btn{
  border: none;
  cursor: pointer;
}
.fab-btn{
  font-family: inherit;
  font-size: inherit;
  font-weight: 950;
  line-height: 1;
  letter-spacing: inherit;

}

/* Give content breathing room so text doesn’t hide behind fabs */
@media (max-width: 900px){
  .container{
    padding-bottom: 140px; /* ensures description doesn’t sit under FABs */
  }
}


/* ===== Mobile Bottom Navigation (Icon-Based) ===== */
.bottom-nav{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;

  display: flex;
  justify-content: space-around;
  align-items: center;

  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: rgba(245,245,245,.95);
  backdrop-filter: blur(12px);

  border-top: 1px solid rgba(29,29,29,.12);
}

.bottom-nav-item{
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;

  text-decoration: none;
  color: var(--primary);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15px;

  padding: 6px 0;
}

/* Icons */
.bottom-nav-item svg{
  width: 22px;
  height: 22px;
  fill: currentColor;
  opacity: .9;
}

/* Active state: subtle + native */
.bottom-nav-item.active{
  color: var(--accent);
}

.bottom-nav-item.active::before{
  content: "";
  position: absolute;
  top: 0;
  width: 32px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

/* Touch feedback */
.bottom-nav-item:active{
  opacity: .7;
}


/* ===== Header Back Button ===== */
.back-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-weight: 800;
  font-size: 14px;
  text-decoration: none;

  color: var(--ink);
  opacity: .85;
}

.back-btn:hover{
  opacity: 1;
}


/* Media previews */
.media-preview{
  border: 1px solid rgba(29,29,29,.12);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 26px rgba(29,29,29,.08);
}

.media-img{
  display: block;
  width: 100%;
  height: auto;
}

.media-video{
  display: block;
  width: 100%;
  height: auto;
  background: #000; /* keeps letterboxing clean */
}


/* Tag toggle row */
.tag-toggle{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 900;
  color: var(--ink);
  user-select: none;
  margin-top: 4px;
}

.tag-toggle input{
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* Tag form container spacing */
.tag-form{
  margin-top: 10px;
}


/* Container for check-in items */
.checkin-list {
  margin-top: 20px;
  padding: 15px;
}

.checkin-items {
  list-style: none;
  padding: 0;
}

.checkin-card {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.checkin-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.checkin-link {
  text-decoration: none;
  color: #333;
}

.checkin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.checkin-header strong {
  font-size: 1.1rem;
  font-weight: bold;
}

.checkin-date {
  font-size: 0.9rem;
  color: #777;
}

.checkin-details {
  margin-top: 10px;
}

.checkin-details p {
  margin: 5px 0;
  font-size: 0.9rem;
  color: #555;
}

.checkin-details strong {
  font-weight: bold;
}
