 /* =========================================================
   Tokens
   ========================================================= */
:root {
  /* Your new palette */
  --bg: #F1E0C5;            /* Page background - Light Beige */
  --ink: #342A21;           /* Body text color - Dark Brown */
  --accent: #DA667B;        /* Buttons / accents - Pink */
  --hover-accent: #342A21;  /* Button hover - Dark Brown */
  --shadow-light: rgba(0, 0, 0, 0);
  --font-size: 12px;

  /* Header-specific */
  --header-ink: rgba(255, 255, 255, 0.85);
  --header-ink-strong: #ffffff;
  --header-border: rgba(255, 255, 255, 0.85);
  --header-grad: linear-gradient(90deg, #DA667B 0%, #71816D 50%, #342A21 100%);
  --header-height: 72px;

  /* Shared content width (paper, drawer, activity cards) */
  --content-max: 720px;
}

/* =========================================================
   Reset / Base
   ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nevis', sans-serif; /* Your current choice */
  background: var(--bg);
  color: var(--ink);
  font-size: var(--font-size);
  line-height: 1.5;
  overflow-x: hidden;
}

/* =========================================================
   Site Header (logo | nav | login)
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;  /* left | center | right */
  align-items: center;
  padding: 0 24px;
  background: var(--header-grad);
  box-shadow: 0 4px 10px var(--shadow-light);
  z-index: 1000;
}

/* Push main content below fixed header */
.shell { padding-top: var(--header-height); }

/* Logo (left) */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--header-ink-strong);
  justify-self: start;
}

.logo-mark {
  width: 22px; height: 22px;
  border: 2px solid var(--header-ink);
  border-radius: 4px;
}

.wordmark {
  font-weight: 300;                 /* thinner look */
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--header-ink-strong);
}

/* Centered primary nav */
.primary-nav {
  display: inline-flex;
  align-items: center;
  gap: 44px;                        /* even spacing between items */
  justify-self: center;
}

.primary-nav a {
  text-decoration: none;
  color: var(--header-ink);
  font-weight: 300;                 /* thin */
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: opacity .2s ease, color .2s ease;
  opacity: .95;
}

.primary-nav a:hover { color: var(--header-ink-strong); opacity: 1; }

/* Pill login button (right) */
.login-btn {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px 1px;
  border: 1.5px solid var(--header-border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--header-ink-strong);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.login-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--header-ink-strong);
  color: var(--header-ink-strong);
}

/* Responsive trims for the header */
@media (max-width: 900px) { .primary-nav { gap: 28px; } }
@media (max-width: 720px) {
  .wordmark { display: none; }
  .primary-nav { gap: 18px; }
  .login-btn { height: 34px; padding: 0 14px 1px; }
}

/* =========================================================
   Layout
   ========================================================= */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

/* Fixed left sidebar */
/* =========================================================
   Sidebar (Chapters list)
   ========================================================= */
.left {
  width: 250px;
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  background: transparent;
  padding: 40px 20px 20px;
  box-shadow: 2px 0 5px var(--shadow-light);
}

.left h4 {
  font-size: 14px;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 20px;
}

/* UL for chapters */
.left #chapters-list {
  display: flex;
  flex-direction: column;
  gap: 18px;          /* more vertical spacing */
  list-style: none;   /* remove default bullets */
  padding-left: 0;    /* remove default UL padding */
}

/* Chapter list items */
.left #chapters-list .section-item {
  padding: 8px 0;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.3s ease;
  position: relative;
  background: transparent;
  border-radius: 8px;
}

/* Hover highlight */
.left #chapters-list .section-item:hover {
  color: var(--accent);
}

/* Divider line under each item */
.left #chapters-list .section-item::after {
  content: "";
  display: block;
  width: 50%;                     /* only half sidebar width */
  height: 1px;
  margin: 8px auto 0;              /* centers line under text */
  background: rgba(255, 255, 255, 0.25);
}

/* Remove divider on the last item */
.left #chapters-list .section-item:last-child::after {
  content: none;
}


/* Main column (centers children and constrains width) */
.main {
  margin-left: 250px;               /* space for fixed sidebar */
  flex: 1;
  padding: 40px;

  display: flex;
  flex-direction: column;
  align-items: center;              /* center children horizontally */
}

/* Paper content block — same width as drawer & cards */
.paper {
  background: var(--bg);
  padding: 30px;
  border-radius: 15px;
  margin: 20px 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);

  width: 100%;
  max-width: var(--content-max);
}

.paper h2 { font-size: 18px; }

/* Ensure the hero image does not affect the text area size */
.paper img {
  max-width: 100%; /* Image should never overflow the container */
  max-height: 400px; /* You can adjust this height as needed */
  height: auto; /* Maintain aspect ratio */
  object-fit: contain; /* Ensure the image fits without distortion */
}


/* =========================================================
   Buttons
   ========================================================= */

.btn:hover { background: var(--hover-accent); }
.btn {
  background: var(--accent);
  color: var(--bg);
  padding: 8px 16px;  /* Reduced padding */
  border-radius: 50px;
  font-size: 12px;    /* Smaller font size */
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease;
}

/* Outline-style buttons (Login, Save, Cancel) */
.btn-outline {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 18px 1px;
  border: 1.5px solid var(--header-border);
  border-radius: 999px;
  background: transparent;
  text-decoration: none;
  color: var(--header-ink-strong);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--header-ink-strong);
  color: var(--header-ink-strong);
}

/* =========================================================
   Drawer (Quill) — aligned to main, same width
   ========================================================= */
.drawer {
  margin-left: 250px;
  padding: 0 40px 20px;
  margin-top: 24px;
  background: transparent;
  box-shadow: none;
  transform: translateY(10px);
  transition: transform 0.3s ease, opacity 0.35s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
}

/* Inner panels sized like .paper */
.drawer-head,
.drawer-body {
  width: 100%;
  max-width: var(--content-max);
}

.drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Drawer header (Save/Cancel strip) */
.drawer-head {
  padding: 12px 0 20px;
  background: transparent;   /* no accent bar */
  color: var(--ink);
  border-radius: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Save Button (Primary Action) */
.drawer-head .ql-toolbar .btn-save {
  background-color: #DA667B !important;  /* Highlighted color for Save button */
  color: #F1E0C5 !important;             /* Light beige text color to maintain contrast */
  padding: 8px 18px !important;
  border-radius: 50px !important;
  font-weight: 500 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease, color 0.3s ease !important;
}

/* Hover effect for Save button */
.drawer-head .ql-toolbar .btn-save:hover {
  background-color: #342A21 !important;  /* Dark brown hover effect for Save button */
  color: #F1E0C5 !important;             /* Keep text color light beige */
}

/* Cancel Button (Secondary Action) */
.drawer-head .ql-toolbar .btn-cancel {
  background-color: #C9B79C !important;  /* Light beige for Cancel button */
  color: #342A21 !important;             /* Dark brown text for contrast */
  padding: 8px 18px !important;
  border-radius: 50px !important;
  font-weight: 500 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease, color 0.3s ease !important;
}

/* Hover effect for Cancel button */
.drawer-head .ql-toolbar .btn-cancel:hover {
  background-color: #342A21 !important;  /* Dark brown hover effect for Cancel button */
  color: #F1E0C5 !important;             /* Light beige text on hover */
}

/* Active/Focused state for both buttons (Save/Cancel) */
.drawer-head .ql-toolbar .btn-save:focus,
.drawer-head .ql-toolbar .btn-cancel:focus {
  outline: 2px solid #DA667B !important;  /* Accent color outline to indicate focus */
  outline-offset: 2px !important;
}

/* Drawer body (editor panel) */
.drawer-body {
  padding: 16px;
  background: var(--bg);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 10px var(--shadow-light), inset 0 2px 6px var(--shadow-light);
}

#editor { 
  min-height: 300px; 
  width: 100%; 
}

/* =========================================================
   Activity Cards — same width and alignment
   ========================================================= */
#activityCards {
  margin-left: 250px;               /* align with main column */
  padding: 0 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;              /* center the column */
  gap: 20px;
}

#activityCards > .activity-card {
  width: 100%;
  max-width: var(--content-max);
}

.activity-card {
  background: var(--bg);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 5px var(--shadow-light);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px var(--shadow-light);
}

.activity-card .uid {
  font-size: 16px;
  color: var(--accent);
  font-weight: 700;
}

.activity-card .section { font-size: 14px; color: var(--ink); }

.activity-card .keywords { font-size: 12px; color: var(--muted); }

/* =========================================================
   Responsive (collapse sidebar offset)
   ========================================================= */
@media (max-width: 780px) {
  :root { --content-max: 92vw; }    /* smooth scaling on phones */

  .left { position: static; width: auto; top: auto; padding: 20px; }
  .main { margin-left: 0; padding: 20px 16px; }
  #activityCards { margin-left: 0; padding: 0 16px 24px; }
  .drawer { margin-left: 0; padding: 0 16px 16px; }
}
/* Style for both Save Draft and Save & Publish buttons */
button.btn,
button#saveDraftBtn,
button#savePublishBtn {
  background-color: #cb769e !important;  /* Button background color */
  color: white !important;                /* White text color */
  padding: 6px 12px !important;           /* Smaller button size */
  border-radius: 50px !important;         /* Rounded corners */
  font-size: 12px !important;             /* Smaller font size */
  cursor: pointer !important;            /* Pointer cursor */
  border: none !important;               /* Remove border */
  transition: background-color 0.3s ease !important;  /* Smooth transition */
}
button.btn-outline {
  background-color: transparent;    /* Transparent background */
  color: #cb769e;                   /* Text color */
  padding: 6px 12px;                /* Button size */
  border: 2px solid #cb769e;        /* Border color */
  border-radius: 50px;              /* Rounded corners */
  font-size: 12px;                  /* Smaller font size */
  cursor: pointer;                 /* Pointer cursor */
  transition: background-color 0.3s ease, color 0.3s ease;  /* Smooth transition */
}

button.btn-outline:hover {
  background-color: #cb769e;        /* On hover: background color */
  color: white;                     /* On hover: text color */
}
