/* Simplified styles for offline viewing - no JS framework needed */
:root {
  --ansysLightText: #333;
  --ansysGold: #d0a040;
  --ansysCarbonBlack: #222;
  --ansysCharBlack: #2a2a2a;
  --ansysDarkText: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #fff;
  color: #333;
  font-size: 15px;
  line-height: 1.5;
}

/* ===== TOP HEADER ===== */
header {
  border-bottom: 1px solid #d0d0d0;
  padding: 8px 16px;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}
.top-bar { display: flex; align-items: center; gap: 12px; width: 100%; }
.top-bar .left { flex: 1; }
.top-bar .right { flex: 0; }
.top-bar img { vertical-align: middle; }
.top-bar .search-small { display: inline-block; }
.top-bar .search-input input,
.top-bar #user_query {
  border: 1px solid #ccc;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 13px;
}
.top-bar .search-btn {
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
}
.top-bar .title { font-size: 13px; color: #666; }

/* ===== MAIN LAYOUT ===== */
.main-content {
  display: flex;
  min-height: calc(100vh - 48px);
}

/* ===== LEFT SIDEBAR (TOC) ===== */
#big_toc {
  width: 280px;
  min-width: 280px;
  background: #f5f5f5;
  border-right: 1px solid #d0d0d0;
  overflow-y: auto;
  height: calc(100vh - 48px);
  position: sticky;
  top: 0;
}
.docs-nav-container { padding: 0; }
.docs-nav { width: 100%; }
.big_toc_container { padding: 0; }
.big_toc_container .grid-x {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #d0d0d0;
  background: #eee;
}
.big_toc_container .cell.left { flex: 1; }
.big_toc_container .cell.text-right { flex: 0; }
.big_toc_container #killtoc { cursor: pointer; width: 20px; height: 20px; }
.big_toc_container #extoc { display: none; }

#call_big_toc {
  padding: 4px 0;
}
#call_big_toc a {
  display: block;
  padding: 4px 12px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
}
#call_big_toc a:hover { background: #e0e0e0; }
#call_big_toc a.toc_active {
  background: #d0d8e8;
  font-weight: 600;
}

/* ===== RIGHT CONTENT ===== */
#doc_page {
  flex: 0 0 100% !important;
  padding: 0 24px !important;
  max-width: 100% !important;
  width: 100% !important;
  overflow-y: auto;
}
.usernavheader {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 12px;
}
.usernavheader .print_page {
  color: #666;
  cursor: pointer;
  font-size: 13px;
}
.usernavheader .print_page:hover { text-decoration: underline; }

/* Hide top navigation bar, header, and original TOC above content */
nav.usernavheader,
.grid-x .usernavheader,
.hide-for-small-only,
.top-bar,
header,
.fileicon,
#toc_toggle,
.search-small,
.main_book_toc,
#big_toc,
#call_big_toc,
.big_toc_container,
.docs-nav-container,
input#user_query,
input#version,
.top-bar .search-btn,
.top-bar .right,
#f6_search_icon,
footer.corp_foot,
.back_button,
.fwd_button,
.search_button,
.product_nav,
.book_nav { display: none !important; }

/* ===== BOOK CONTENT ===== */
.book { padding: 0 0 40px 0; }

/* Main TOC on index page */
.main_book_toc { margin: 0 0 20px 0; }
.main_book_toc .expandall,
.main_book_toc .collapseall { cursor: pointer; color: #175cd3; font-size: 13px; }
.main_book_toc a[name] { display: block; margin-top: 12px; }
.main_book_toc dl { margin: 8px 0; }
.main_book_toc dt { margin: 4px 0; }
.main_book_toc dt span.chapter { font-weight: 600; }
.main_book_toc dt span { font-size: 14px; }
.main_book_toc dt a { color: #333; text-decoration: none; }
.main_book_toc dt a:hover { color: #175cd3; text-decoration: underline; }
.main_book_toc dd { margin-left: 24px; }
.main_book_toc dd dl { margin: 2px 0; }
.main_book_toc dd dt { font-weight: normal; }
.main_book_toc .smalltext { color: #666; margin-bottom: 4px; }

/* ===== CHAPTER CONTENT ===== */
.chapter h1.title,
.section h1.title,
h1 { font-size: 1.6em; margin: 0.5em 0; }
h2 { font-size: 1.3em; margin: 0.8em 0 0.4em; border-bottom: 1px solid #ddd; padding-bottom: 4px; }
h3 { font-size: 1.1em; margin: 0.6em 0 0.3em; }
h4 { font-size: 1em; margin: 0.5em 0 0.2em; }

p { margin: 0.5em 0; line-height: 1.6; }

dl { margin: 0.8em 0; }
dt { font-weight: 600; margin-top: 0.6em; }
dd { margin-left: 2em; margin-bottom: 0.3em; }

ul, ol { margin: 0.5em 0; padding-left: 2em; }
li { margin: 0.3em 0; }

img { max-width: 100%; height: auto; }
.inlinemediaobject img, .inlinemediaobject object { display: inline; vertical-align: middle; }

table {
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
}
th, td {
  border: 1px solid #d0d0d0;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}
th { background: #f0f0f0; font-weight: 600; }

pre {
  background: #f5f5f5;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
}
code {
  background: #f0f0f0;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.9em;
}
pre code { background: none; padding: 0; }

.figure { margin: 1em 0; text-align: center; }
.figure-title { font-style: italic; font-size: 0.9em; color: #666; margin-top: 4px; }

/* Tables inside content */
.informaltable table,
.informaltable table { margin: 1em 0; }
.entry { padding: 4px 8px; border: 1px solid #d0d0d0; }

/* Notes and admonitions */
.note, .warning, .tip, .caution {
  margin: 1em 0;
  padding: 10px 14px;
  border-left: 4px solid #175cd3;
  background: #f0f5ff;
}
.warning { border-left-color: #d04040; background: #fff0f0; }
.tip { border-left-color: #40a040; background: #f0fff0; }

/* Print page button */
.print_page { color: #666; cursor: pointer; font-size: 13px; }
.print_page:before { content: "\\1F5A8"; margin-right: 4px; }

/* Search area */
.search-autocomplete-wrapper,
.autocomplete { display: none; }

/* Responsive */
@media (max-width: 900px) {
  .main-content { flex-direction: column; }
  #doc_page { padding: 0 12px !important; }
}
