/* static/css/02_shell.css
   Chrome layout only.
   Owns: topbar height, sidebar width, page padding, positioning.
   DOES NOT style buttons/icons/etc.
*/

:root{
  --nav-h: 56px;
  --sidebar-w: 260px;
  --content-pad: 18px;
}

/* static/css/02_shell.css
   Chrome layout only.
   Owns: topbar height, sidebar width, page padding, positioning.
   DOES NOT style buttons/icons/etc.
*/

:root{
  --nav-h: 56px;
  --sidebar-w: 260px;
  --content-pad: 18px;
}

/* layout safety */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{ margin: 0; }

/* App shell: column (topbar + body) */
.shell{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

/* Under the fixed topbar */
.shell-body{
  flex: 1;
  display: flex;
  align-items: stretch;

  padding-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}

/* Sidebar: pinned under nav */
.shell-body > .sidebar{
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);

  height: calc(100vh - var(--nav-h));
  position: sticky;
  top: var(--nav-h);
  overflow: auto;

  border-right: 1px solid var(--border);
  background: var(--surface);
}

/* Main content */
.shell-main{
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--content-pad);
}

/* -------------------- Right feed drawer -------------------- */

.feed-panel-backdrop{
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 40;
}

.feed-panel{
  position: fixed;
  top: var(--nav-h);
  right: 0;
  width: min(360px, 92vw);
  height: calc(100vh - var(--nav-h));
  transform: translateX(100%);
  transition: transform 180ms ease;
  z-index: 41;
  pointer-events: none;
}

.feed-panel--open{
  transform: translateX(0);
  pointer-events: auto;
}

.feed-panel--closed{
  transform: translateX(100%);
  pointer-events: none;
}

.feed-panel__inner{
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  border-radius: 0;
  border-left: 1px solid var(--border);
}

.feed-panel__header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.feed-panel__title{
  margin: 0;
}

.feed-panel__subtitle{
  margin: var(--space-1) 0 0;
}

.feed-panel__body{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: var(--space-4);
}

/* Mobile: sidebar becomes top section */
@media (max-width: 900px){
  .shell-body{
    display: block;
    padding-top: var(--nav-h);
  }

  .shell-body > .sidebar{
    width: 100%;
    flex: none;
    position: relative;
    top: 0;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .feed-panel{
    width: min(100vw, 420px);
  }
}