/* ============================================================
   NowJuneau Widgets — njw.css
   ============================================================ */

:root {
  --njw-night:   #0a1208;
  --njw-forest:  #1c3220;
  --njw-spruce:  #4a7c59;
  --njw-spruce3: #9fcfaa;
  --njw-glacier: #7ab8c8;
  --njw-glacier2:#a8d4e0;
  --njw-salmon:  #c84830;
  --njw-gold:    #c8941c;
  --njw-fog:     #e8e4dc;
  --njw-fog2:    #d4cfc4;
  --njw-ink:     #1a1e16;
  --njw-ink3:    #6a6e64;
}

/* ── BANNER ─────────────────────────────────────────────────── */
.njw-banner {
  background: var(--njw-night);
  padding: 5px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: monospace;
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.njw-banner-items {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.njw-bi {
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.njw-bi strong { color: #fff; font-weight: 500; }
.njw-icon { font-size: 12px; }
.njw-sep { color: rgba(255,255,255,0.15); padding: 0 4px; }

.njw-aurora-pill {
  background: rgba(80,220,120,0.12);
  border: 1px solid rgba(80,220,120,0.2);
  border-radius: 20px;
  padding: 1px 8px;
}

.njw-tide-mini {
  display: inline-flex;
  align-items: flex-end;
  gap: 1px;
  height: 12px;
  vertical-align: middle;
  margin: 0 3px;
}

.njw-tide-seg {
  width: 3px;
  border-radius: 1px 1px 0 0;
  background: var(--njw-glacier);
  opacity: 0.4;
}

.njw-tide-seg.now {
  opacity: 1;
  background: var(--njw-glacier2);
}

.njw-live {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
  font-family: monospace;
  font-size: 10px;
}

.njw-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4adf8a;
  animation: njwBlink 2s infinite;
  flex-shrink: 0;
}

@keyframes njwBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── AURORA TRACKER ─────────────────────────────────────────── */
.njw-aurora-tracker {
  background: linear-gradient(135deg, #0a1810, #0e2018);
  border: 1px solid rgba(80,220,120,0.15);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 0 0 24px;
  position: relative;
}

.njw-aurora-tracker::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(80,220,120,0.4), rgba(60,180,200,0.3), transparent);
}

.njw-aurora-label {
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--njw-spruce3);
  margin-bottom: 14px;
}

.njw-aurora-body {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* KP Number */
.njw-kp-display { display: flex; align-items: center; gap: 10px; }

.njw-kp-number {
  font-family: monospace;
  font-size: 32px;
  font-weight: 400;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 20px rgba(80,220,120,0.5);
}

.njw-kp-number sup {
  font-size: 12px;
  color: var(--njw-spruce3);
  vertical-align: super;
}

.njw-kp-meta { display: flex; flex-direction: column; gap: 3px; }

.njw-kp-status {
  font-family: monospace;
  font-size: 12px;
  font-weight: 500;
  color: #4adf8a;
}

.njw-kp-sub {
  font-family: monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}

/* KP Bar */
.njw-kp-bar-wrap { flex: 1; min-width: 140px; max-width: 240px; }

.njw-kp-track {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.njw-kp-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  background: #4adf8a;
  transition: width 1.2s ease, background 1.2s ease;
}

.njw-kp-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.njw-kp-scale span {
  font-family: monospace;
  font-size: 8px;
  color: rgba(255,255,255,0.22);
}

/* Visibility */
.njw-vis-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 8px 12px;
}

.njw-vis-label {
  font-family: monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.njw-vis-value {
  font-family: monospace;
  font-size: 12px;
  color: #fff;
  margin-bottom: 4px;
}

.njw-vis-sub {
  display: flex;
  align-items: center;
  gap: 5px;
}

.njw-vis-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #666;
}

#njwVisNote {
  font-family: monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.35);
}

/* Forecast bars */
.njw-forecast { display: flex; flex-direction: column; gap: 4px; min-width: 100px; }

.njw-fc-label {
  font-family: monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.njw-fc-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}

.njw-fc-bar {
  width: 8px;
  border-radius: 2px 2px 0 0;
  background: rgba(80,220,120,0.25);
  min-height: 3px;
}

.njw-fc-bar.active {
  background: rgba(80,220,120,0.9);
}

.njw-fc-nums {
  display: flex;
  gap: 3px;
}

.njw-fc-nums span {
  font-family: monospace;
  font-size: 7px;
  color: rgba(255,255,255,0.2);
  width: 8px;
  text-align: center;
}

/* Footer */
.njw-aurora-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.njw-noaa-link {
  font-family: monospace;
  font-size: 9px;
  color: rgba(80,220,120,0.5);
  text-decoration: none;
  margin-left: auto;
}

.njw-noaa-link:hover { color: var(--njw-spruce3); }

.njw-alert-pill {
  background: rgba(232,88,62,0.2);
  border: 1px solid rgba(232,88,62,0.4);
  color: #f08060;
  font-family: monospace;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── THIS WEEK IN JUNEAU ─────────────────────────────────────── */
.njw-this-week {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.njw-event-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--njw-fog2);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.2s;
}

.njw-event-row:hover { border-color: var(--njw-spruce); }

.njw-event-date {
  background: var(--njw-forest);
  color: #fff;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 52px;
}

.njw-event-month {
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: monospace;
  color: var(--njw-spruce3);
}

.njw-event-day {
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  margin-top: 2px;
  color: #fff;
}

.njw-event-body {
  padding: 10px 12px 10px 0;
  flex: 1;
}

.njw-event-tag {
  display: inline-block;
  background: rgba(42,157,143,0.12);
  color: var(--njw-spruce);
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 2px;
  font-family: monospace;
  margin-bottom: 4px;
}

.njw-event-name {
  font-size: 13px;
  color: var(--njw-ink);
  margin-bottom: 4px;
}

.njw-event-meta {
  font-size: 10px;
  color: var(--njw-ink3);
  font-family: monospace;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── COMMUNITY BOARD ─────────────────────────────────────────── */
.njw-board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 640px) {
  .njw-board-grid { grid-template-columns: 1fr; }
  .njw-aurora-body { flex-direction: column; align-items: flex-start; }
  .njw-banner-items { flex-wrap: wrap; }
}

.njw-pin-card {
  background: #fff;
  border: 1px solid var(--njw-fog2);
  border-radius: 6px;
  padding: 12px 14px;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, transform 0.15s;
}

.njw-pin-card:hover {
  border-color: var(--njw-spruce);
  transform: translateY(-2px);
}

.njw-pin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.njw-pin-cat {
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: monospace;
}

.njw-pin-time {
  font-size: 9px;
  color: var(--njw-ink3);
  font-family: monospace;
}

.njw-pin-title {
  font-size: 13px;
  color: var(--njw-ink);
  margin-bottom: 6px;
  line-height: 1.4;
}

.njw-pin-body {
  font-size: 11px;
  color: var(--njw-ink3);
  line-height: 1.5;
  font-family: monospace;
}

.njw-pin-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.njw-pin-author {
  font-size: 9px;
  color: var(--njw-ink3);
  font-family: monospace;
}

.njw-pin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Misc */
.njw-empty {
  color: var(--njw-ink3);
  font-family: monospace;
  font-size: 13px;
  padding: 16px;
  text-align: center;
  border: 1px dashed var(--njw-fog2);
  border-radius: 6px;
}
