/* ==========================================================
   home.css
   Home layout styled to match Journal Shelf aesthetic
   ========================================================== */

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.25s, color 0.25s;
}

/* ==========================================================
   HEADER
   ========================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--header-bg);
  color: var(--header-text);
  padding: 8px 20px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand .logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.sub-badge {
  display: block;
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-bg-color);
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 0px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ===== HEADER (Logo + Badge) ===== */
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start; /* aligns both to the left edge */
  justify-content: center;
}



.brand a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}


/* sub-badge spans exactly the logo width */
.sub-badge {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 0px;

  font-size: 11px;
  font-weight: 600;

  padding: 3px 0;           /* vertical padding only */
  border-radius: 3px;       /* gentle corners instead of pill */
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.1;

  /* makes width match logo instead of full parent */
  box-sizing: border-box;
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================
   MAIN
   ========================================================== */
.home main {
  flex: 1;
  padding: 2rem;
}

.home main h1 {
  margin-top: 0;
  font-size: 1.6rem;
  color: var(--text-color);
}


/* ==========================================================
   FOOTER
   ========================================================== */
footer.app-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.9rem;
  padding: 1rem;
}


/* ==========================================================
   HEADER & FOOTER LINKS AS BUTTONS
   ========================================================== */

/* Make all header/footer links look like buttons... */
.app-header a,
.app-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.app-header a:hover,
.app-footer a:hover,
.app-header a:focus,
.app-footer a:focus {
  background-color: var(--btn-hover-bg);
  color: var(--btn-text);
  text-decoration: none;
}

/* ...except the logo link inside .brand */
.brand a {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  cursor: pointer;       /* still clickable */
}

/* Accent button variant (e.g. Journals link) */
.app-header a.btn-accent,
.app-footer a.btn-accent {
  background: var(--accent-bg-color);
  border-color: var(--accent-bg-color);
  color: #fff;
}

.app-header a.btn-accent:hover,
.app-footer a.btn-accent:hover {
  filter: brightness(1.1);
}

/* Info / secondary variant (if used as <a>) */
.app-header a.btn-info,
.app-footer a.btn-info {
  background: var(--btn-info-bg);
  border-color: var(--btn-info-bg);
  color: var(--btn-info-text);
}

.app-header a.btn-info:hover,
.app-footer a.btn-info:hover {
  filter: brightness(1.05);
}

/* Danger / secondary variant (if used as <a>) */
.app-header a.btn-danger,
.app-footer a.btn-danger {
  background: var(--btn-danger-bg);
  border-color: var(--btn-danger-bg);
  color: var(--btn-danger-text);
}

.app-header a.btn-danger:hover,
.app-footer a.btn-danger:hover {
  filter: brightness(1.05);
}

/* ==========================================================
   THEME TOGGLE BUTTON NORMALIZATION
   ========================================================== */

/* Match visual size with text buttons */
#themeToggleBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;          /* same as .btn */
  line-height: 1;
  vertical-align: middle;
}

/* Ensure the inserted SVG fits within same vertical rhythm */
#themeToggleBtn svg {
  width: 16px;
  height: 16px;
  display: block;              /* remove baseline gap */
  pointer-events: none;        /* ignore clicks inside icon */
  stroke-width: 2;
}

/* Optional: slight tweak so it doesn't look cramped */
#themeToggleBtn.btn-info svg {
  margin-top: 1px;
}

.default-sidebar {
  width: 280px;
  padding: 1rem;
  background: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow-y: auto;
  max-height: calc(100vh - 100px); /* fits below header */
  position: sticky;
  top: 80px; /* distance from top (adjust to match header height) */
}
