/* ==========================================================
   Call for Book Chapters — shared stylesheet (blue theme)
   Layout: blue header · left contents pane · right content · footer
   ========================================================== */

:root {
  --navy: #154360;
  --blue: #1f497d;
  --blue-light: #d5e4f3;
  --blue-pale: #eef4fb;
  --ground: #f7f9fc;
  --ink: #283647;
  --muted: #5d6b7a;
  --button: #007bff;
  --button-hover: #00008b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--ground);
  color: var(--ink);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

p, li { font-size: 1rem; line-height: 1.6; }
ul, ol { padding-left: 1.3rem; }

/* ---------- Header / footer ---------- */
header, footer {
  background-color: var(--navy);
  color: #fff;
  padding: 20px 15px;
  text-align: center;
}
header h1 { margin: 0; font-weight: 700; font-size: 1.8rem; }
header .book-title { margin: 10px auto 6px; font-size: 1.45rem; font-weight: 600; color: #fff; max-width: 900px; }
header .publisher { margin: 4px 0 8px; font-size: 1.05rem; letter-spacing: 3px; font-weight: 700; }
header .note { margin: 0; font-size: .98rem; color: #dce8f4; }
header .back { display: inline-block; margin-bottom: 8px; color: #cfe0f1; font-size: .9rem; }
footer p { margin: 0; font-size: .92rem; }
footer a { color: #fff; }

/* ---------- Two-pane layout ---------- */
#container {
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  max-width: 1300px;
  margin: 0 auto;
}

#leftPane {
  flex: 1 1 280px;
  min-width: 260px;
  max-width: 330px;
  border-right: 3px solid var(--blue);
  padding-right: 20px;
  align-self: flex-start;
  position: sticky;
  top: 10px;
}

#rightPane {
  flex: 3 1 600px;
  min-width: 0;
  padding-left: 25px;
}

section { scroll-margin-top: 10px; margin-bottom: 10px; }

h2 {
  color: var(--blue);
  border-bottom: 3px solid var(--blue);
  padding-bottom: 5px;
}
h3 { color: var(--navy); margin-bottom: .4rem; }

/* ---------- Left pane pieces ---------- */
#leftPane ul { list-style: none; padding: 0; margin: 0; }
#leftPane li a {
  display: block; padding: 7px 10px; border-radius: 6px; font-weight: 600;
}
#leftPane li a:hover { background: var(--blue-light); text-decoration: none; }

.logo-box {
  margin-top: 18px; background: #fff; border: 2px solid var(--blue-light);
  border-radius: 8px; padding: 12px; text-align: center;
}
.logo-box img { max-height: 70px; }

.brochure-box {
  margin-top: 18px; background: var(--blue-pale); border: 2px dashed var(--navy);
  border-radius: 8px; padding: 14px; text-align: center;
}
.brochure-box p { margin: 0 0 10px; font-weight: 600; color: var(--navy); }
.brochure-box .small { display: block; margin-top: 8px; font-size: .88rem; }

/* ---------- Buttons ---------- */
.beautiful-button {
  display: inline-block;
  background-color: var(--button);
  color: #fff;
  padding: 10px 18px;
  font-size: 1.05rem;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,.2);
  cursor: pointer;
  transition: background-color .3s ease, transform .2s ease;
}
.beautiful-button:hover {
  background-color: var(--button-hover);
  color: #fff;
  text-decoration: none;
  transform: scale(1.04);
  box-shadow: 0 6px 12px rgba(0,0,0,.3);
}

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 15px 0; background: #fff; }
th, td { border: 1.5px solid var(--blue); padding: 8px 12px; text-align: left; }
th { background-color: var(--blue-light); color: var(--navy); }
.closed { text-decoration: line-through; text-decoration-color: red; }

/* ---------- Table of contents (parts) ---------- */
.part h3 {
  background: var(--blue-light); border-left: 5px solid var(--navy);
  padding: 7px 12px; margin: 18px 0 6px; font-size: 1.05rem;
}
.part ul { margin: 0 0 6px; }
.part li { padding: 2px 0; }

/* ---------- Highlight box ---------- */
.highlight {
  background: var(--blue-pale); border-left: 5px solid var(--blue);
  padding: 10px 14px; margin: 14px 0;
}

/* ---------- References (APA hanging indent) ---------- */
ul.refs { list-style: none; padding-left: 0; margin: 0 0 10px; }
ul.refs li { padding-left: 2em; text-indent: -2em; margin-bottom: 8px; }
ul.refs a { word-break: break-all; }

/* ---------- Editors ---------- */
.editor {
  display: flex; gap: 18px; align-items: flex-start;
  background: #fff; border: 1.5px solid var(--blue-light); border-radius: 8px;
  padding: 14px; margin-bottom: 14px;
}
.editor img {
  width: 110px; height: 122px; object-fit: cover; border-radius: 6px;
  border: 2px solid var(--blue-light); flex: 0 0 auto;
}
.editor h3 { margin: 0 0 4px; }
.editor p { margin: 2px 0; }

/* ---------- Index page: book list ---------- */
.book-item {
  background: #fff; border: 1.5px solid var(--blue-light); border-left: 6px solid var(--blue);
  border-radius: 8px; padding: 16px 20px; margin-bottom: 16px;
}
.book-item h3 { margin: 6px 0 6px; font-size: 1.2rem; }
.book-item p { margin: 4px 0; }
.status {
  display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; padding: 2px 10px; border-radius: 999px;
}
.status.open { background: #d4edda; color: #1d6b34; }
.status.soon { background: #fff3cd; color: #7a5a0c; }
.status.closed { background: #e2e3e5; color: #555; }
.book-item .actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Mobile ---------- */
@media (max-width: 800px) {
  #container { padding: 14px; }
  #leftPane {
    position: static; max-width: none; border-right: none;
    border-bottom: 3px solid var(--blue); padding: 0 0 14px;
  }
  #rightPane { padding-left: 0; }
  .editor { flex-direction: column; }
  header h1 { font-size: 1.5rem; }
  header .book-title { font-size: 1.2rem; }
}
