/* v152 Admin navigation
   Admin-facing topbar now copies the public Home page nav treatment.
   Active page keeps the exact same button shape and only adds a subtle blue glow.
*/

/* Match the public-facing fixed topbar shell */
body nav.topbar,
nav.topbar,
.topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 14px 218px 14px 36px !important;
  background: rgba(3, 6, 13, .82) !important;
  border-bottom: 1px solid rgba(15, 104, 234, .18) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-shadow: none !important;
}

/* Match public logo/brand sizing */
body nav.topbar .nav-brand,
nav.topbar .nav-brand,
.topbar .nav-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  color: inherit !important;
  flex: 0 0 auto !important;
  min-width: max-content !important;
}

body nav.topbar .nav-brand img,
nav.topbar .nav-brand img,
.topbar .nav-brand img {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(15, 104, 234, .40) !important;
  box-shadow: 0 0 14px rgba(15, 104, 234, .25) !important;
  object-fit: cover !important;
}

body nav.topbar .nav-brand-text,
nav.topbar .nav-brand-text,
.topbar .nav-brand-text {
  font-family: 'Cinzel', serif !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: 1px !important;
  color: #fff !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body nav.topbar .nav-brand-text span,
nav.topbar .nav-brand-text span,
.topbar .nav-brand-text span {
  color: var(--accent2, #5fa1ff) !important;
}

/* Make admin nav use the same layout as .nav-links on the public pages */
body nav.topbar .admin-top-nav,
nav.topbar .admin-top-nav,
.topbar .admin-top-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  min-width: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  overflow: visible !important;
}

/* Exact public nav button treatment */
body nav.topbar .admin-top-nav a,
nav.topbar .admin-top-nav a,
.topbar .admin-top-nav a {
  font-family: 'Cinzel', serif !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 2px !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  color: var(--muted, #7aa8e0) !important;
  border: 1px solid rgba(15, 104, 234, .22) !important;
  background: rgba(15, 104, 234, .04) !important;
  padding: 7px 13px !important;
  border-radius: 5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  white-space: nowrap !important;
  position: relative !important;
  overflow: visible !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
}

body nav.topbar .admin-top-nav a::before,
body nav.topbar .admin-top-nav a::after,
nav.topbar .admin-top-nav a::before,
nav.topbar .admin-top-nav a::after,
.topbar .admin-top-nav a::before,
.topbar .admin-top-nav a::after {
  content: none !important;
  display: none !important;
}

body nav.topbar .admin-top-nav a:hover,
nav.topbar .admin-top-nav a:hover,
.topbar .admin-top-nav a:hover {
  color: #fff !important;
  border-color: rgba(15, 104, 234, .55) !important;
  background: rgba(15, 104, 234, .12) !important;
  transform: translateY(-1px) !important;
  box-shadow: none !important;
}

/* Active = same public button, only page glow. No gold, no filled blue, no underline. */
body nav.topbar .admin-top-nav a.active,
body nav.topbar .admin-top-nav a[aria-current="page"],
nav.topbar .admin-top-nav a.active,
nav.topbar .admin-top-nav a[aria-current="page"],
.topbar .admin-top-nav a.active,
.topbar .admin-top-nav a[aria-current="page"] {
  color: #fff !important;
  border-color: rgba(15, 104, 234, .55) !important;
  background: rgba(15, 104, 234, .12) !important;
  transform: none !important;
  box-shadow: 0 0 20px rgba(15, 104, 234, .32) !important;
}

/* Keep the account chip from overlapping the nav, matching public page spacing. */
body nav.topbar #ll-login-panel-slot,
nav.topbar #ll-login-panel-slot,
.topbar #ll-login-panel-slot {
  flex: 0 0 auto !important;
}

/* Remove duplicate hero/admin button rows. The top nav is the only admin navigation. */
body.ll-vibe-page .rcon-admin-hero > .hero-pills,
body.connected-home-identical .rcon-admin-hero > .hero-pills,
body.rcon-home-identical .rcon-admin-hero > .hero-pills,
body.ll-feedback-admin-theme .admin-feedback-hero > .hero-pills,
.admin-lock-pills,
.admin-dashboard-pills,
.rcon-admin-hero .admin-tool-dock,
.admin-tool-dock {
  display: none !important;
}

/* Banner manager page layout: keep controls working while matching the admin page shell. */
body.rcon-home-identical .banner-manager-content {
  width: min(1240px, calc(100vw - 48px)) !important;
  margin: 0 auto 42px !important;
}

body.rcon-home-identical .banner-manager-content .page-title,
body.rcon-home-identical .banner-manager-content .page-sub,
body.rcon-home-identical .banner-manager-content .admin-lock-badge {
  text-align: center !important;
}

body.rcon-home-identical .banner-manager-content .admin-lock-badge {
  width: fit-content !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.rcon-home-identical .banner-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr) !important;
  gap: 18px !important;
  align-items: start !important;
}

body.rcon-home-identical .banner-layout > .panel,
body.rcon-home-identical .banner-layout > div > .panel,
body.rcon-home-identical .banner-layout > aside.panel {
  height: auto !important;
  border-radius: 18px !important;
}

body.rcon-home-identical .banner-form-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 14px !important;
  padding: 16px !important;
}

body.rcon-home-identical .banner-field,
body.rcon-home-identical .banner-field.full {
  min-width: 0 !important;
}

body.rcon-home-identical .banner-field.full {
  grid-column: 1 / -1 !important;
}

body.rcon-home-identical .banner-field input,
body.rcon-home-identical .banner-field select,
body.rcon-home-identical .banner-field textarea {
  width: 100% !important;
  min-height: 38px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(15, 104, 234, .32) !important;
  background: rgba(3, 10, 22, .72) !important;
  color: #eaf3ff !important;
  outline: none !important;
}

body.rcon-home-identical .banner-field textarea {
  min-height: 78px !important;
  resize: vertical !important;
}

body.rcon-home-identical .banner-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 0 16px 16px !important;
}

body.rcon-home-identical aside.panel .banner-actions {
  grid-template-columns: 1fr !important;
}

body.rcon-home-identical .banner-actions .btn,
body.rcon-home-identical .banner-actions a.btn,
body.rcon-home-identical .banner-actions button.btn {
  width: 100% !important;
  min-height: 42px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

body.rcon-home-identical .preview-banner .inner {
  align-items: center !important;
}

@media (max-width: 1180px) {
  body nav.topbar,
  nav.topbar,
  .topbar {
    padding-right: 190px !important;
  }

  body nav.topbar .admin-top-nav,
  nav.topbar .admin-top-nav,
  .topbar .admin-top-nav {
    gap: 5px !important;
  }

  body nav.topbar .admin-top-nav a,
  nav.topbar .admin-top-nav a,
  .topbar .admin-top-nav a {
    font-size: 9px !important;
    letter-spacing: 1.5px !important;
    padding: 6px 10px !important;
  }
}

@media (max-width: 1080px) {
  body.rcon-home-identical .banner-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  body nav.topbar,
  nav.topbar,
  .topbar {
    padding: 12px 176px 12px 14px !important;
  }

  body nav.topbar .admin-top-nav,
  nav.topbar .admin-top-nav,
  .topbar .admin-top-nav {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
  }

  body.rcon-home-identical .banner-manager-content {
    width: min(100% - 24px, 1240px) !important;
  }

  body.rcon-home-identical .banner-form-grid,
  body.rcon-home-identical .banner-actions {
    grid-template-columns: 1fr !important;
  }
}
