/* Keep child rows truly hidden until JS reveals them */
#rowWeek[hidden],
#rowSettings[hidden] {
  display: none !important;
}

/* Wrapper behaves, doesn’t crash into right column */
/* Mirror PixelTest exactly so Hub row aligns */
#hubNav {
  width: 100%;
  margin-top: 1rem;        /* match PixelTest */
  margin-bottom: 1.25rem;  /* match PixelTest */
  padding-top: 0;
  padding-bottom: 0;
}



#leftRail .rail-body,
#rightRail .rail-body {
  background-color: #fff;
  border: 1px solid rgba(176, 138, 72, 0.25); /* gold tint */
  border-radius: 12px;
}

/* Headings inside rails */
#leftRail .rail-body h1,
#leftRail .rail-body h2,
#leftRail .rail-body h3,
#rightRail .rail-body h1,
#rightRail .rail-body h2,
#rightRail .rail-body h3 {
  color: #2b2b2b;
}

/* Inputs */
#leftRail .rail-body input[type="text"],
#rightRail .rail-body input[type="text"] {
  border: 1px solid #ced4da;
  border-radius: 8px;
  padding: 0.375rem 0.75rem;
}

#leftRail .rail-body input[type="text"]:focus,
#rightRail .rail-body input[type="text"]:focus {
  border-color: #b08a48;
  box-shadow: 0 0 0 0.25rem rgba(176, 138, 72, 0.25);
  outline: 0;
}

/* Checkboxes */
#leftRail .rail-body input[type="checkbox"],
#rightRail .rail-body input[type="checkbox"] {
  accent-color: #b08a48; /* modern browsers */
  transform: scale(1.05);
}

/* Buttons (e.g., Add, Record, X) */
#leftRail .rail-body button,
#rightRail .rail-body button {
  border: 1px solid #b08a48;
  color: #b08a48;
  background-color: #fff;
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  line-height: 1.2;
  cursor: pointer;
}

#leftRail .rail-body button:hover,
#rightRail .rail-body button:hover {
  background-color: #b08a48;
  color: #fff;
}

/* Filter links (All | Active | Done) */
#leftRail .rail-body a,
#rightRail .rail-body a {
  color: #b08a48;
  text-decoration: none;
}

#leftRail .rail-body a:hover,
#rightRail .rail-body a:hover {
  text-decoration: underline;
}

/* Task list rows */
#leftRail .rail-body ul,
#rightRail .rail-body ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

#leftRail .rail-body ul > li,
#rightRail .rail-body ul > li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#leftRail .rail-body ul > li:last-child,
#rightRail .rail-body ul > li:last-child {
  border-bottom: 0;
}

/* Small muted notes/status inside rails */
#leftRail .rail-body .status--muted,
#rightRail .rail-body .status--muted {
  color: #6c757d;
}

/* --- Remove double borders INSIDE rails only --- */

/* Cards rendered inside rails should not add an extra box */
#leftRail .rail-body .card,
#rightRail .rail-body .card {
  border: 0;
  box-shadow: none;
  background: transparent;
}

/* To-Do quick list: remove per-item dividers; spacing only */
#leftRail .rail-body ul.todo-list > li,
#rightRail .rail-body ul.todo-list > li {
  border-bottom: 0;         /* override earlier ul > li rule */
  padding-left: 0.25rem;    /* subtle spacing without lines */
  padding-right: 0.25rem;
}

/* If any list groups/cards sneak in with borders, neutralize them in rails */
#leftRail .rail-body .list-group-item,
#rightRail .rail-body .list-group-item {
  border: 0;
}

/* ---- Secondary nav container: canonical behavior ---- */
@media (min-width: 601px) {
  #hubNav .nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.24rem !important;
    justify-content: flex-start !important;
    margin-left: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
  }
}

/* DESKTOP (>=601px): always pills in a horizontal row */
@media (min-width: 601px){
  /* Desktop only: flex row */
  #hubNav,
  #hubNav .nav,
  #hubNav > ul,
  #hubNav > div{
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.24rem !important;
  }
}

/* Force mobile grid to win at ≤600 px — container only */
@media (max-width: 600px){
  #hubNav{
    display: grid !important;
    grid-template-columns: repeat(auto-fit,minmax(96px,1fr)) !important;
    grid-auto-rows: minmax(84px,1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    align-content: start !important;
  }
}

/* MOBILE (<=600px): flatten wrappers so their children become direct grid items */
@media (max-width: 600px) {
  #hubNav .nav,
  #hubNav > ul,
  #hubNav > div {
    display: contents !important;
  }
  /* ensure children aren’t forced full-width */
  #hubNav .nav > li,
  #hubNav .nav > * {
    width: auto !important;
    min-width: 0 !important;
  }
}




/* Mobile tiles: one screen, grid layout */
/* Mobile tiles: one screen, grid layout — scoped like Hub */
@media (max-width: 600px) {
  /* Grid only on container — flatten all inner wrappers */
  #hubNav {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)) !important;
    grid-auto-rows: minmax(84px, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    align-content: start !important;
  }

  /* Flatten wrappers so children are direct grid items */
  #hubNav .nav,
  #hubNav > ul,
  #hubNav > div {
    display: contents !important;
  }

  /* Ensure children do not force full width */
  #hubNav .nav > li,
  #hubNav .nav > * {
    width: auto !important;
    min-width: 0 !important;
  }

  /* Each tile fills its own grid cell cleanly */
  #hubNav .hub-btn,
  #hubNav .nav-pills .nav-link,
  #hubNav button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0.5rem !important;
    font-size: 0.9rem !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    text-align: center !important;
    border: 1px solid var(--brand-gold, #b08a48) !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: var(--bs-body-color, #000) !important;
    box-sizing: border-box !important;
  }
}





/* Desktop pills only; mobile tiles are defined in the mobile @media above */
@media (min-width: 601px) {
  #hubNav .nav-pills .nav-link {
    padding: 0.18rem 0.48rem !important;
    font-size: 0.84rem !important;
    line-height: 1.2 !important;
    min-height: 30px !important;
    border-radius: 0.5rem !important;
    border: 1px solid var(--brand-gold, #b08a48) !important;
    box-sizing: border-box !important;
    background-clip: padding-box !important;
    width: auto !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 991.98px){
  /* 1) Remove the hamburger entirely */
  nav.navbar .navbar-toggler,
  nav.navbar .navbar-toggler .navbar-toggler-icon{
    display: none !important;
  }

  /* 2) Keep the nav actions visible even without .collapse/.show and neutralize Pixel's absolute/opacity */
  nav.navbar #mainNav{
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    position: static !important;
    width: auto !important;
  }

  /* 3) Make the inner container a horizontal row aligned right */
  nav.navbar #mainNav.navbar-collapse{
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  /* 4) Bootstrap defaults .navbar-nav to column on mobile — override to row with gap */
  nav.navbar #mainNav .navbar-nav{
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-left: auto !important; /* mimic .ms-auto on small screens */
  }

  /* 5) Ensure actions remain compact, not full-width */
  nav.navbar #mainNav .navbar-nav .nav-item{
    display: inline-flex !important;
  }
  nav.navbar #mainNav .navbar-nav .btn,
  nav.navbar #mainNav .navbar-nav .nav-link.btn{
    width: auto !important;
    white-space: nowrap !important;
  }
}
