/* ========================================
   DOCSIFY CUSTOM STYLES
   Perangkat Pembelajaran - Bahasa Inggris
   ======================================== */

/* ==========================================
   GENERAL STYLING
   ========================================== */
:root {
  --primary-color: #2c5aa0;
  --secondary-color: #e8f4f8;
  --accent-color: #f0f8ff;
  --border-color: #ddd;
  --text-dark: #333;
  --text-light: #666;
  --success-color: #28a745;
  --warning-color: #ffc107;
}

/* Custom font */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.8em;
}

body,
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section strong,
.markdown-section em,
.anchor span {
  color: #000;
}

body,
.markdown-section ol,
.markdown-section p,
.markdown-section ul {
  line-height: 1.3em;
}

/* ==========================================
   TABLE STYLING - MODUL AJAR
   ========================================== */

.markdown-section table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.markdown-section table ul,
.markdown-section table ol {
  margin: 0;
  padding-left: 20px;
}

.markdown-section table tr:first-child.header td {
  background: none;
  color: var(--text-dark);
}

.markdown-section table tr.header td,
.markdown-section table tr.header th {
  background-color: var(--primary-color);
  color: white;
  padding: 12px;
  text-align: left;
  font-weight: bold;
}

.markdown-section table td {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  vertical-align: top;
}

.markdown-section table td:first-child {
  width: 60px;
  text-align: center;
}

.markdown-section table tr:hover {
  background-color: var(--accent-color);
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
  .markdown-section table tr:first-child.header td {
    background: none !important;
    color: var(--text-dark) !important;
  }

  /* Hide sidebar */
  .sidebar,
  .sidebar-toggle,
  aside.sidebar {
    display: none !important;
  }

  /* Hide edit document buttons */
  .edit-document,
  .edit-on-github,
  .edit-link,
  [href*="edit"],
  .edit-doc,
  .docsify-edit-on-github,
  .edit-page,
  .github-corner,
  .edit-button,
  a[title*="edit"],
  a[title*="Edit"] {
    display: none !important;
    visibility: hidden !important;
  }

  /* Hide first paragraph containing edit document link */
  .markdown-section p:first-child {
    display: none !important;
  }

  /* Hide navigation (previous/next) */
  .pagination-item,
  .pagination-item-title,
  .docsify-pagination,
  nav[aria-label="pagination"] {
    display: none !important;
  }

  /* Adjust main content for full width */
  .content,
  .markdown-section,
  main,
  section.content,
  .app-main {
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
    left: 0 !important;
    transform: translateX(0) !important;
  }

  /* Override Docsify's default sidebar spacing */
  body {
    margin-left: 0 !important;
  }

  /* Normalize header font sizes */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-size: 14pt !important;
    margin: 10pt 0 5pt 0 !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Keep title and table together */
  h1 + table,
  h2 + table,
  h3 + table {
    page-break-before: avoid !important;
  }

  /* Reduce table cell padding */
  .markdown-section table td,
  .markdown-section table th {
    padding: 4px 6px !important;
    font-size: 10pt !important;
  }

  /* Full width tables with no margins */
  .markdown-section table {
    width: 100% !important;
    margin: 0 !important;
    page-break-inside: avoid;
  }

  /* Remove hover effects for print */
  .markdown-section table tr:hover {
    background-color: transparent !important;
  }

  /* Ensure good contrast for print */
  .markdown-section table tr.header td,
  .markdown-section table tr.header th {
    background-color: #333 !important;
    color: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
