/* ================================================================
   fix.css — Badlands Community Forum Style Fix
   Targets: SMF 2.1 + Steyle-V2 Theme Override
   ================================================================ */

/* ----------------------------------------------------------------
   CSS Variables — Badlands Dark Gold Palette
   ---------------------------------------------------------------- */
:root {
  --gold:        #e9d1ad;
  --gold-light:  #f5e8cc;
  --gold-dim:    #c4a97a;
  --gold-dark:   #8c6d3f;
  --bg-deep:     #111009;
  --bg-dark:     #1a1713;
  --bg-mid:      #23201a;
  --bg-panel:    #2b271f;
  --bg-hover:    #332e24;
  --border:      rgba(180, 140, 70, 0.2);
  --border-active: rgba(180, 140, 70, 0.5);
  --text-main:   #e8e2d4;
  --text-dim:    #a09880;
  --text-muted:  #6a6050;
  --red-accent:  #a82114;
  --online:      #5cb85c;
  --font-main:   'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-title:  'Cinzel Decorative', 'Trajan Pro', Georgia, serif;
  --nav-h:       56px;
}

/* ----------------------------------------------------------------
   Reset & Base
   ---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dark) var(--bg-dark);
}

body::-webkit-scrollbar        { width: 6px; }
body::-webkit-scrollbar-track  { background: var(--bg-dark); }
body::-webkit-scrollbar-thumb  { background: var(--gold-dark); border-radius: 3px; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--gold-light); }

/* ----------------------------------------------------------------
   SVG Wave Dividers
   ---------------------------------------------------------------- */
.custom-shape-divider-bottom-1660155424,
.custom-shape-divider-top-1660156928 {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.custom-shape-divider-bottom-1660155424 {
  height: 0;        /* hide top wave — it's decorative only */
  display: none;
}

.custom-shape-divider-top-1660156928 {
  height: 60px;
  margin-bottom: -2px;
}

.custom-shape-divider-top-1660156928 svg,
.custom-shape-divider-bottom-1660155424 svg {
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

.shape-fill {
  fill: var(--bg-mid);
}

/* ----------------------------------------------------------------
   Top Navigation Bar
   ---------------------------------------------------------------- */
#top_section.p-nav {
  background: linear-gradient(180deg, #1a1510 0%, rgba(26, 21, 13, 0.96) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
}

.p-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
}

/* Logo */
.p-header-logo.p-header-logo--image {
  flex-shrink: 0;
  width: 140px;
  height: 40px;
  background: url('https://www.badlands.online/logo.png') left center / contain no-repeat;
  display: block;
}

/* Main menu */
#main_menu {
  display: flex;
  align-items: center;
}

ul.menu_nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}

ul.menu_nav li a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #c8b98a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

ul.menu_nav li a:hover,
ul.menu_nav li a.active {
  color: var(--gold-light);
  background: rgba(180, 140, 70, 0.12);
}

/* Right side: login/signup + search */
.p-nav-opposite {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#top_info {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.4rem;
}

#top_info li a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.button_login a {
  color: var(--gold-dim) !important;
  border: 1px solid var(--border);
  background: transparent;
}

.button_login a:hover {
  background: rgba(180, 140, 70, 0.1) !important;
  border-color: var(--border-active) !important;
  color: var(--gold-light) !important;
}

.button_signup a {
  color: var(--bg-deep) !important;
  background: var(--gold-dim) !important;
  border: 1px solid var(--gold-dim);
}

.button_signup a:hover {
  background: var(--gold-light) !important;
  color: var(--bg-deep) !important;
}

.textmenu {
  display: inline;
}

/* Search dropdown */
.dropdown_search {
  position: relative;
}

.dropbtn_search {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gold-dim);
  width: 34px;
  height: 34px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  padding: 0;
}

.dropbtn_search:hover {
  background: rgba(180, 140, 70, 0.12);
  border-color: var(--border-active);
  color: var(--gold-light);
}

.dropdown-content_search {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  min-width: 260px;
  z-index: 300;
  overflow: hidden;
}

.dropdown-content_search.active,
#myDropdown.show {
  display: block !important;
  animation: dropIn 0.15s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.menu-header {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.menu-row {
  padding: 0.6rem 1rem;
}

.menu-row input[type="search"],
.menu-row select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.menu-row input[type="search"]:focus,
.menu-row select:focus {
  border-color: var(--border-active);
}

.menu-footer {
  padding: 0.6rem 1rem 0.75rem;
  border-top: 1px solid var(--border);
}

.menu-footer input[type="submit"],
.menu-footer .button {
  width: 100%;
  padding: 0.5rem 1rem;
  background: var(--gold-dim);
  border: none;
  border-radius: 4px;
  color: var(--bg-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s;
}

.menu-footer input[type="submit"]:hover {
  background: var(--gold-light);
}

/* Mobile menu button */
.mobile_user_menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}

.menu_icon {
  width: 22px;
  height: 2px;
  background: var(--gold);
  display: block;
  border-radius: 2px;
}

/* ----------------------------------------------------------------
   Header / Page Title
   ---------------------------------------------------------------- */
#header {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0 1rem;
}

.p-title {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

#siteslogan {
  font-family: var(--font-title);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dim);
  font-style: italic;
  margin-bottom: 0.25rem;
}

.p-title-pageAction {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* CTA Buttons (Unread Posts, Updated Topics) */
.p-title-pageAction .button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
}

.p-title-pageAction .button {
  color: var(--gold-dim);
  border: 1px solid var(--border);
  background: transparent;
}

.p-title-pageAction .button:hover {
  background: rgba(180, 140, 70, 0.1);
  border-color: var(--border-active);
  color: var(--gold-light);
}

.p-title-pageAction .button--cta {
  background: var(--gold-dim);
  color: var(--bg-deep);
  border-color: var(--gold-dim);
}

.p-title-pageAction .button--cta:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--bg-deep);
}

.button-text { display: inline; }

/* ----------------------------------------------------------------
   Main Layout Wrapper
   ---------------------------------------------------------------- */
#footerfix {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
}

#wrapper {
  flex: 1;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
  padding: 1.5rem 1.5rem;
}

.p-body-main.p-body-main--withSidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-areas:
    "content sidebar";
  gap: 1.5rem;
  align-items: start;
}

.p-body-contentCol {
  display: none; /* Empty div in HTML */
}

.p-body-sidebarCol {
  display: none; /* Empty div in HTML */
}

#boardindex_table {
  grid-area: content;
}

#info_center {
  grid-area: sidebar;
}

/* ----------------------------------------------------------------
   Forum Board Area — Main Container
   ---------------------------------------------------------------- */
.main_container {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  position: relative;
  margin-bottom: 1rem;
}

/* Decorative corner shapes */
.wt-shape-left,
.wt-shape-right,
.wt-shape-top-left,
.wt-shape-bottom-right {
  display: none;  /* hide decorative divs from theme — replaced by border-radius */
}

/* ----------------------------------------------------------------
   Category Bar
   ---------------------------------------------------------------- */
.cat_bar {
  background: linear-gradient(90deg, rgba(140, 109, 63, 0.3) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.catbg {
  margin: 0;
  padding: 0.7rem 1.25rem 0.3rem;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.catbg a {
  color: inherit;
}

.desc {
  padding: 0 1.25rem 0.6rem;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-style: italic;
}

/* ----------------------------------------------------------------
   Board List
   ---------------------------------------------------------------- */
.block-body.block-body--collapsible {
  background: transparent;
}

/* ----------------------------------------------------------------
   Individual Board Row
   ---------------------------------------------------------------- */
.node-body.up_contain {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(180, 140, 70, 0.08);
  transition: background 0.15s ease;
  position: relative;
}

.node-body.up_contain:last-child {
  border-bottom: none;
}

.node-body.up_contain:hover {
  background: rgba(180, 140, 70, 0.05);
}

/* Board Icon */
.board_icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

.board_icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(140, 109, 63, 0.25);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.board_icon a.board_on::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 6px var(--online);
  display: block;
}

.board_icon a:hover {
  background: rgba(140, 109, 63, 0.45);
  border-color: var(--border-active);
  transform: scale(1.08);
}

/* Board Info */
.info {
  flex: 1;
  min-width: 0;
}

a.subject.mobile_subject {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

a.subject.mobile_subject:hover {
  color: var(--gold-light);
}

.board_description {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Sub-boards dropdown */
.dropdown-content_children {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.dropdown-content_children a {
  display: inline-block;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(180, 140, 70, 0.06);
  border: 1px solid rgba(180, 140, 70, 0.12);
  border-radius: 10px;
  padding: 2px 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dropdown-content_children a:hover {
  color: var(--gold-dim);
  background: rgba(180, 140, 70, 0.15);
  border-color: var(--border-active);
}

/* Board Stats */
.board_stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  min-width: 80px;
}

.counter_stats {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.counter_stats i {
  font-style: normal;
  color: var(--text-muted);
  margin-right: 2px;
}

.stats_no {
  color: var(--gold-dim);
  font-weight: 700;
  margin-left: 2px;
}

/* Last post */
.lastpost {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 0;
  max-width: 160px;
  text-align: right;
  flex-shrink: 0;
}

/* ----------------------------------------------------------------
   Sidebar (#info_center)
   ---------------------------------------------------------------- */
.p-body-sidebar.make-me-sticky {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

#upshrink_stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.block-container {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.sub_bar {
  background: linear-gradient(90deg, rgba(140, 109, 63, 0.25) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.sub_bar h4.subbg {
  margin: 0;
  padding: 0.65rem 1rem;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub_bar h4 a {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub_bar h4 a:hover { color: var(--gold-light); }

.sub_bar .fa,
.sub_bar .fas {
  font-size: 13px;
  opacity: 0.8;
}

p.inline {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.7;
}

p.inline strong { color: var(--gold-dim); }
p.inline a { color: var(--gold-dim); }
p.inline a:hover { color: var(--gold-light); }

/* ----------------------------------------------------------------
   Popup / Mobile menu panel
   ---------------------------------------------------------------- */
.popup_container {
  display: none;    /* hidden by default, toggled by JS */
}

.popup_window.description {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.popup_heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
}

.main_icons.hide_popup {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
}

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */
#footer {
  background: var(--bg-mid);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.footer-bottom ul {
  list-style: none;
  margin: 0 0 0.35rem;
  padding: 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom li,
.footer-bottom .copyright {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-dim);
  transition: color 0.15s;
}

.footer-bottom a:hover { color: var(--gold-dim); }

.footer-bottom p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  text-align: right;
}

.floatright { margin-left: auto; }
.floatleft  { margin-right: auto; }

/* Font Awesome heart in footer */
.fas.fa-heart { color: #c0392b !important; }

/* ----------------------------------------------------------------
   Global Button & Form Utility
   ---------------------------------------------------------------- */
.button, button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="search"],
input[type="text"],
select {
  background: var(--bg-mid);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-size: 13px;
  outline: none;
  width: 100%;
}

input:focus, select:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 2px rgba(180, 140, 70, 0.1);
}

/* ----------------------------------------------------------------
   Responsive — Tablet & Mobile
   ---------------------------------------------------------------- */
@media screen and (max-width: 900px) {
  .p-body-main.p-body-main--withSidebar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "content"
      "sidebar";
  }

  .p-body-sidebar.make-me-sticky {
    position: static;
  }

  .board_stats {
    display: none;
  }

  .lastpost {
    display: none;
  }
}

@media screen and (max-width: 680px) {
  .p-nav-inner {
    padding: 0 1rem;
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  #top_section.p-nav {
    height: auto;
    position: sticky;
    top: 0;
  }

  .p-header-logo.p-header-logo--image {
    width: 100px;
    height: 32px;
  }

  ul.menu_nav li a .textmenu,
  #top_info li a .textmenu {
    display: none;
  }

  ul.menu_nav li a,
  #top_info li a {
    padding: 0.4rem 0.6rem;
  }

  #wrapper {
    padding: 1rem;
  }

  .p-title {
    padding: 0 1rem;
  }

  .node-body.up_contain {
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .footer-bottom ul {
    flex-direction: column;
    gap: 0.25rem;
  }

  .footer-bottom p {
    text-align: left;
  }
}

@media screen and (max-width: 480px) {
  .p-title-pageAction .button-text {
    display: none;
  }

  .p-title-pageAction .button {
    padding: 0.4rem 0.6rem;
  }

  .catbg {
    font-size: 12px;
  }
}

/* ----------------------------------------------------------------
   Popup container shown state (JS toggled)
   ---------------------------------------------------------------- */
.popup_container.is-shown {
  display: block;
}

/* ----------------------------------------------------------------
   Utility classes from SMF
   ---------------------------------------------------------------- */
.is-active  { display: block; }
.is-hidden  { display: none !important; }

/* ----------------------------------------------------------------
   Animations
   ---------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.main_container {
  animation: fadeUp 0.3s ease both;
}

.block-container {
  animation: fadeUp 0.35s ease both;
}
