/* =========================================================
     BASE
     ========================================================= */
html,
body {
  margin: 0;
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;

  font-family: Arial, Helvetica, sans-serif;
  background: #111;
  color: #eee;

  overscroll-behavior-y: contain;
  touch-action: pan-y;
}
/* HERO HEIGHT IS REQUIRED FOR SMART UI BANNER EXPAND SCROLL FEATURE */
.hero {
  padding-top: 60px;
  width: 100%;
  flex: 1;
  background: #000;
  overflow: hidden;
}

/* wrapper must define height */
.hero-image-wrap {
  width: 100%;
  height: 100%;
}

/* image must fill wrapper */
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
  animation: heroFadeIn 1.2s ease-out forwards;

  transform: scale(1);
  transition: transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

body.panel-open .hero-image {
  transform: scale(1.05);
}

/* =========================================================
     HEADER (FIXED)
     ========================================================= */
.bw-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 1000;

  background: #222;
  border-bottom: 1px solid #444;

  display: flex;
  align-items: center;
}

.bw-header-inner {
  width: 100%;
  padding: 0 16px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bw-header-logo {
  color: #eee;
  text-decoration: none;
  font-weight: 600;
}

.bw-header-nav {
  display: flex;
  gap: 24px;
}

.bw-nav-link {
  color: #eee;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.9;
}

.bw-nav-link:hover {
  opacity: 1;
}

.bw-header-right {
  display: flex;
  gap: 12px;
}

footer {
  height: 60px;
}

/* =========================================================
   AUTH STATE
   ========================================================= */
[data-auth='logged-in'] {
  display: none;
}

/* =========================================================
     SLIDE-DOWN NAV PANEL (REFERENCE BEHAVIOR)
     ========================================================= */
.bw-nav-panel {
  position: fixed;
  top: 60px; /* MUST match header height */
  left: 0;
  right: 0;

  z-index: 999;

  background: #1a1a1a;
  border-bottom: 1px solid #333;

  transform: translateY(-110%);
  opacity: 0;

  transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 320ms ease;

  will-change: transform, opacity;
}

body.panel-open .bw-nav-panel {
  transform: translateY(0);
  opacity: 1;
}

.bw-nav-panel-inner {
  padding: 16px;
}

.bw-nav-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.bw-nav-panel-title {
  margin: 0;
  font-size: 14px;
}

.bw-nav-panel-close {
  background: none;
  border: none;
  color: #bbb;
  font-size: 22px;
  cursor: pointer;
}

.bw-nav-panel-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.bw-nav-panel-item h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
}

.bw-nav-panel-item p {
  margin: 0;
  font-size: 13px;
  opacity: 0.8;
}

.bw-nav-panel-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #333;

  display: flex;
  gap: 14px;
}

/* =========================================================
     CONTENT OFFSET (PREVENT HEADER OVERLAP)
     ========================================================= */
main {
  padding-top: 60px;
}

/* =========================================================
     TOAST
     ========================================================= */
#toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;

  background: #222;
  color: #eee;
  border: 1px solid #444;
  border-radius: 8px;

  padding: 8px 12px;
  font-size: 14px;
  display: none;

  z-index: 9999;
}

/* =========================================================
     ADMIN MODAL
     ========================================================= */
.admin-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 99999;

  justify-content: center;
  align-items: center;
}

.admin-modal-content {
  background: #222;
  padding: 20px;
  width: 260px;
  border-radius: 8px;
  border: 1px solid #444;
}

.admin-modal-content h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

.admin-modal-content input {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 14px;
  padding: 8px;

  background: #111;
  border: 1px solid #555;
  color: #eee;
  border-radius: 5px;
}

.admin-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-modal-buttons button {
  background: #2e2e2e;
  border: 1px solid #555;
  color: #eee;
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
}

.admin-modal-buttons button:hover {
  background: #444;
}
