/* ==================================================
APP UI LAYOUT SYSTEM
Usage:
<div class="app-container"><div class="app-row"><div class="app-col-6"></div></div></div>
================================================== */

/* ===================================================
Explain what these classes do
app-container, app-container-fluid
 - 
=======================================================*/
.app-container,
.app-container-fluid {
  width: 100%;
  padding-right: 0.9rem;
  padding-left: 0.9rem;
  margin: 0 auto;
}

.app-container { max-width: 1120px; }


/* ===================================================
Explain what these classes do
app-row
 - 
=======================================================*/
.app-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.5rem;
  margin-left: -0.5rem;
}

.app-row > [class*="app-col"] {
  padding-right: 0.5rem;
  padding-left: 0.5rem;
}

.app-col { flex: 1 0 0%; }
.app-col-12 { width: 100%; }
.app-col-11 { width: 91.6667%; }
.app-col-10 { width: 83.3333%; }
.app-col-9 { width: 75%; }
.app-col-8 { width: 66.6667%; }
.app-col-7 { width: 58.3333%; }
.app-col-6 { width: 50%; }
.app-col-5 { width: 41.6667%; }
.app-col-4 { width: 33.3333%; }
.app-col-3 { width: 25%; }
.app-col-2 { width: 16.6667%; }
.app-col-1 { width: 8.3333%; }

/* ===================================================
Explain what these classes do
app-navbar
 - 
=======================================================*/
.app-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0.5rem 0.9rem;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
}

.app-navbar-brand {
  color: var(--app-slate-900);
  font-weight: 700;
  font-size: 0.95rem;
}

.app-navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.app-navbar-link {
  padding: 0.34rem 0.6rem;
  border-radius: var(--app-radius-sm);
  font-size: 0.82rem;
  color: var(--app-slate-700);
}

.app-navbar-link:hover {
  background: var(--app-slate-100);
  color: var(--app-primary);
  text-decoration: none;
}


.app-footer{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

.app-footer p{
  margin: 0;
}

.app-main{
  padding-bottom: 5rem;
}

@media (max-width: 575.98px) {
  .app-footer{
    position: relative;
  }

  .app-main{
    padding-bottom: 0;
  }
}

/* ===================================================
Footer fixed on mobile
 ================================================== */
@media (max-width: 575.98px) {
  .app-footer{
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .app-main{
    padding-bottom: 5rem;
  }
}

/* app-fixed-bottom -  */
.app-fixed-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}


/* app-dashboard-sidebar */
.app-sidebar{
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  background: var(--app-surface);
  border-right: 1px solid var(--app-border);
}

.app-sidebar-header{
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--app-border);
}

/* sidebar-footer */
.app-sidebar-footer{
  padding: 0.5rem 0.9rem;
  border-top: 1px solid var(--app-border);
}

/* sidebar-main */
.app-sidebar-main{
  padding: 0.5rem 0.9rem;
}


/* ===================================================
CCU site header — compact top bar, brand + search entry point.
Desktop also gets inline nav links here; mobile relies on the
bottom nav bar instead (see .ccu-bottom-nav below).
=======================================================*/
.ccu-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--ccu-header-height);
  padding: 0 1rem;
  background: var(--app-primary);
  color: var(--app-white);
}

/* `a.` prefix on both selectors below: without it, `.app-ui a` in
   app-ui-core.css (a class+type selector) outranks a bare class selector
   and repaints this white header text/icon navy — invisible against the
   navy header background. Same fix as the shelf card / help CTA below. */
a.ccu-header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--app-white);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ccu-header-brand img { height: 26px; width: 26px; border-radius: 6px; }

a.ccu-header-search-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--app-white);
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
  flex-shrink: 0;
}

.ccu-header-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.ccu-header-nav a {
  padding: 0.4rem 0.65rem;
  border-radius: var(--app-radius-sm);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.ccu-header-nav a:hover,
.ccu-header-nav a.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--app-white);
}


/* ===================================================
CCU bottom nav — the primary mobile navigation surface (MY_BUILD_PREFERENCE
§21: "collapsible hamburger and/or bottom navigation bar on mobile"). Hidden
at the desktop breakpoint in app-ui-responsive.css, where the header nav
takes over instead.
=======================================================*/
.ccu-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  height: var(--ccu-bottomnav-height);
  background: var(--app-surface);
  border-top: 1px solid var(--app-border);
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.ccu-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  color: var(--app-muted);
  text-decoration: none;
  font-size: 0.66rem;
  font-weight: 600;
}

.ccu-bottom-nav a i { font-size: 1.15rem; }

.ccu-bottom-nav a.is-active {
  color: var(--app-primary);
}

.ccu-main {
  min-height: calc(100vh - var(--ccu-header-height));
  padding-bottom: calc(var(--ccu-bottomnav-height) + 1.5rem);
}


/* ===================================================
Breadcrumb — shown on Shelf and Article pages.
=======================================================*/
.ccu-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--app-muted);
  margin-bottom: 1rem;
}

.ccu-breadcrumb a { color: var(--app-muted); text-decoration: none; }
.ccu-breadcrumb a:hover { color: var(--app-primary); text-decoration: underline; }
.ccu-breadcrumb .sep { opacity: 0.5; }
.ccu-breadcrumb .current { color: var(--app-text); font-weight: 600; }