/* ============================================
   Independence Day (July 4th) Theme Styles for Urbex Planet
   Subtle red/white/blue accents + gentle fireworks
   ============================================ */

:root {
  --usa-red: #B22234;
  --usa-white: #FFFFFF;
  --usa-blue: #3C3B6E;
  --usa-blue-bright: #1E40AF;
  --usa-glow: rgba(30, 64, 175, 0.18);
}

/* ============================================
   Independence Day Banner/Toast Notification
   ============================================ */
.independence-banner {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--usa-blue), var(--usa-red));
  border: 2px solid var(--usa-white);
  border-radius: 12px;
  padding: 12px 20px;
  color: white;
  z-index: 10000;
  box-shadow: 0 8px 32px rgba(30, 64, 175, 0.3);
  animation: independence-banner-appear 0.8s ease-out;
  max-width: 320px;
  text-align: left;
  font-weight: 500;
  pointer-events: auto;
}

.independence-banner .independence-icon {
  font-size: 1.2rem;
  margin-right: 6px;
}

.independence-banner .close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  margin-left: 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0;
  line-height: 1;
  vertical-align: middle;
}

.independence-banner .close-btn:hover {
  opacity: 1;
}

@keyframes independence-banner-appear {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================
   Subtle top accent bar (red / white / blue)
   ============================================ */
.independence-theme::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9997;
  pointer-events: none;
  opacity: 0.55;
  background: linear-gradient(
    90deg,
    var(--usa-red) 0%,
    var(--usa-red) 33.33%,
    var(--usa-white) 33.33%,
    var(--usa-white) 66.66%,
    var(--usa-blue-bright) 66.66%,
    var(--usa-blue-bright) 100%
  );
}

/* ============================================
   Corner star accents (static, decorative)
   ============================================ */
.independence-star {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  opacity: 0.15;
  font-size: 3rem;
  filter: drop-shadow(0 0 4px var(--usa-glow));
}

.independence-star.top-left  { top: 8px;  left: 10px; }
.independence-star.top-right { top: 8px;  right: 10px; }

/* ============================================
   Canvas particle fireworks (drawn by JS)
   Low overlay: above the opaque page background but below the
   navbar (z-2000), dropdowns and modals — so it never covers
   site chrome. pointer-events:none keeps everything clickable.
   Low opacity so it reads as a gentle glow, not a distraction.
   ============================================ */
#independence-fireworks-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}

/* ============================================
   Subtle accents on existing elements
   ============================================ */
/* Hairline blue/red underline on the sticky navbar. */
.independence-theme .navbar {
  box-shadow: inset 0 -2px 0 0 rgba(30, 64, 175, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Gentle red accent under the active nav tab. */
.independence-theme .nav-btn-active {
  box-shadow: inset 0 -2px 0 0 var(--usa-red);
}

/* ============================================
   Mobile adjustments — lighten the theme
   ============================================ */
@media (max-width: 768px) {
  .independence-banner {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  .independence-star { font-size: 2rem; opacity: 0.1; }
  #independence-fireworks-canvas { opacity: 0.4; }
}

/* ============================================
   Respect reduced-motion preference
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .independence-banner {
    animation: none;
  }
  /* JS already skips the canvas under reduced motion; hide as a belt-and-braces. */
  #independence-fireworks-canvas { display: none; }
}
