/**
 * PornVotes — Full layout rebuild.
 * PAGE = CONSOLE COLUMN (left, ~18%) | CONTENT COLUMN (right).
 * Content column = NAV + AD BAR 1 + AD BAR 2 + VIDEO GRID (same width, no separate header).
 * No gap between console and content.
 */

:root {
  --pv-content-padding: 24px;
}

/* PAGE */
#pv-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

#pv-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

/* CONSOLE COLUMN — ~18% viewport, fixed left, scrolls independently */
#pv-console {
  width: 18%;
  min-width: 0;
  flex-shrink: 0;
  background: #0b0b0b;
  border-right: 1px solid #1f1f1f;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#pv-console-brand {
  padding: 12px 16px 8px;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 0;
}

#pv-console-brand .pv-brand-slogan {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#pv-console-inner {
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  flex: 1;
}

/* CONTENT COLUMN — one vertical stack: nav, ad1, ad2, grid */
#pv-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Same horizontal padding for nav, ad bars, grid — edges align, no left gap */
#pv-topbar,
#pv-ad-line,
#pv-ad-line-2,
#pv-main-inner {
  padding-left: var(--pv-content-padding);
  padding-right: var(--pv-content-padding);
  box-sizing: border-box;
}

#pv-topbar,
#pv-ad-line,
#pv-ad-line-2 {
  flex-shrink: 0;
}

#pv-topbar {
  width: 100%;
  min-height: 60px;
  background: #000;
  border-bottom: 1px solid #1f1f1f;
  display: flex;
  align-items: center;
}

/* Nav: 5-column layout — Key | Categories | All Videos | Search | Legal. Spacing by columns only. */
#pv-topbar-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 2fr 1fr;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
}

#pv-top-key,
#pv-top-left,
#pv-top-legal {
  justify-self: center;
  min-width: 0;
}

#pv-top-center {
  grid-column: 3 / 5;
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
  justify-self: stretch;
  min-width: 0;
}

#pv-top-all {
  justify-self: center;
}

#pv-top-search {
  justify-self: stretch;
  min-width: 0;
}

#pv-top-search form {
  min-width: 0;
  width: 100%;
}

#pv-search-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Single typography rule for all nav items */
#pv-topbar-inner .pv-top-item,
#pv-topbar-inner a.pv-top-item {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

/* Ad bars: same width as grid, identical styling */
#pv-ad-line,
#pv-ad-line-2 {
  min-height: 28px;
  background: #000;
  border-bottom: 1px solid #111;
  display: flex;
  align-items: center;
}

#pv-ad-line .pv-ad-inner,
#pv-ad-line-2 .pv-ad-inner {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 2.5rem;
  padding: 10px 0;
  font-size: 14px;
  letter-spacing: 0.45em;
  color: #555;
  box-sizing: border-box;
}

/* Grid container: scrolls inside content column */
#pv-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

#pv-main-inner {
  padding-bottom: var(--pv-content-padding);
  padding-top: 0;
}

#pv-feed-header {
  padding-top: 2px;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

/* Console touch targets */
#pv-console button,
#pv-console .pv-top-item,
#pv-console a[role="button"] {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#pv-console .pv-gc-section,
#pv-console .pv-console-box {
  margin-bottom: 20px;
}

/* Responsive: console above content — LOGO, NAV, AD BARS, GRID */
@media (max-width: 900px) {
  #pv-page {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  #pv-layout {
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: visible;
  }

  #pv-console {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #1f1f1f;
    overflow: visible;
  }

  #pv-console-inner {
    overflow: visible;
    flex: none;
  }

  #pv-content {
    width: 100%;
    overflow: visible;
  }

  #pv-topbar,
  #pv-ad-line,
  #pv-ad-line-2,
  #pv-main-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  #pv-topbar-inner {
    padding-left: 0;
    padding-right: 0;
  }

  #pv-main {
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: auto;
  }
}
