/* =====================================================================
   G-SMaRT Accounting - the User's Manual (manual.php). Loads after app.css:
   the same palette, bar and menu; this file styles the reading page.
   ===================================================================== */

.min-w-0 { min-width: 0; }

/* ------------------------------------------------------------------ top bar search */
.man-search { position: relative; }
.man-search > .bi-search { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: #8b949e; font-size: .85rem; pointer-events: none; z-index: 2; }
.man-search > .form-control { padding-left: 2rem; }
.man-search-bar { width: 340px; }
.man-search-bar > .form-control {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #e9ecef; border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
}
.man-search-bar > .form-control::placeholder { color: #98a2ad; }
.man-search-bar > .form-control:focus { background: #fff; color: var(--ink); border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .3); }
.man-search-big { max-width: 640px; }
.man-search-big > .form-control { font-size: 1rem; padding: .6rem .9rem .6rem 2.3rem; border-radius: 10px; box-shadow: var(--inset); }
.man-search-big > .bi-search { font-size: 1rem; left: .85rem; }

.man-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 320px; max-height: min(70vh, 560px); overflow-y: auto; z-index: 1060;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--raise-2);
}
.man-search-bar .man-results { left: auto; width: 460px; }
.man-results a { display: block; padding: .55rem .8rem; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.man-results a:last-child { border-bottom: 0; }
.man-results a:hover, .man-results a.is-active { background: var(--blue-tint); text-decoration: none; }
.man-results .r-t { font-weight: 600; color: #18212b; }
.man-results .r-c { font-size: .76rem; color: var(--muted); }
.man-results .r-x { font-size: .8rem; color: var(--ink-soft); margin-top: .15rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.man-results mark { padding: 0 .1em; background: #fff3bf; border-radius: 2px; }
.man-results .r-none { padding: .8rem; color: var(--muted); font-size: .85rem; }

/* ------------------------------------------------------------------ contents in the menu */
.man-side .menu-link.man-ch { display: flex; align-items: flex-start; gap: .55rem; padding-right: .75rem; }
.man-ch-no {
  flex: none; width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; margin-top: .05rem;
  font-size: .72rem; font-weight: 700; color: #475467; background: #eef1f5; box-shadow: 0 1px 0 #fff inset, 0 1px 1px rgba(15, 23, 42, .1);
}
.man-side .menu-link.active .man-ch-no { background: var(--blue); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 1px 2px rgba(13, 110, 253, .35); }
.man-ch-t { flex: 1; min-width: 0; line-height: 1.3; }
.man-lock { color: #98a2ad; font-size: .8rem; margin-top: .15rem; }
.man-secs { margin: .15rem 0 .5rem 2.55rem; border-left: 1px solid var(--line); }
.man-sec { display: block; padding: .22rem .75rem; font-size: .8rem; color: var(--ink-soft); line-height: 1.3; border-left: 2px solid transparent; margin-left: -1px; }
.man-sec:hover { color: #111827; text-decoration: none; background: #eef1f5; }
.man-sec.is-here { color: var(--blue-deep); border-left-color: var(--blue); font-weight: 600; }

/* ------------------------------------------------------------------ contents page */
.man-lead { font-size: 1rem; line-height: 1.6; color: var(--ink-soft); max-width: 880px; }
.man-card { color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--raise-1); transition: transform .12s ease, box-shadow .12s ease; }
.man-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--raise-2); border-color: #c9d6ea; }
.man-card-no {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; font-weight: 700; font-size: 1rem; color: #fff;
  background: linear-gradient(180deg, #3d8bfd, #0b5ed7); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 -1px 0 rgba(0, 0, 0, .2) inset, 0 3px 8px -2px rgba(13, 110, 253, .5);
}
.man-card.is-locked .man-card-no { background: linear-gradient(180deg, #adb5bd, #868e96); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 3px 8px -3px rgba(0, 0, 0, .35); }
.man-card-t { font-weight: 650; font-size: 1rem; color: #18212b; margin-bottom: .25rem; }
.man-card-x { font-size: .85rem; color: var(--ink-soft); margin-bottom: .5rem; line-height: 1.45; }
.man-card-f { font-size: .78rem; color: var(--muted); }
.man-locked { max-width: 640px; margin: 1rem auto; border-radius: var(--radius); box-shadow: var(--raise-1); }
.man-locked-i { font-size: 2.2rem; color: #98a2ad; display: block; margin-bottom: .75rem; }

/* ------------------------------------------------------------------ the chapter */
.man-wrap { display: flex; gap: 1.75rem; align-items: flex-start; }
.man-doc {
  flex: 1; min-width: 0; max-width: 960px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--raise-1); padding: 1.75rem 2.25rem 1.5rem; font-size: .95rem; line-height: 1.65; color: #1f2933;
}
.man-print-head { display: none; }
.man-doc > :first-child { margin-top: 0; }
.man-doc h2, .man-doc h3, .man-doc h4 { color: #18212b; letter-spacing: -.005em; scroll-margin-top: calc(var(--bar-h) + 14px); position: relative; }
.man-doc h2 { font-size: 1.35rem; font-weight: 700; margin: 2.6rem 0 .9rem; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); }
.man-doc h2:first-of-type { margin-top: 1.2rem; }
.man-doc h3 { font-size: 1.12rem; font-weight: 650; margin: 2rem 0 .7rem; }
.man-doc h4 { font-size: .98rem; font-weight: 650; margin: 1.5rem 0 .55rem; color: #344054; }
.man-hash { margin-left: .4rem; font-size: .9em; color: #98a2ad; opacity: 0; transition: opacity .12s; }
.man-doc h2:hover .man-hash, .man-doc h3:hover .man-hash, .man-doc h4:hover .man-hash, .man-hash:focus { opacity: 1; text-decoration: none; }
.man-doc :target { animation: man-flash 1.8s ease-out 1; }
@keyframes man-flash { 0% { background: #fff3bf; box-shadow: 0 0 0 .4rem #fff3bf; } 100% { background: transparent; box-shadow: 0 0 0 .4rem transparent; } }
.man-doc p { margin-bottom: .85rem; }
.man-doc ul, .man-doc ol { padding-left: 1.5rem; margin-bottom: .95rem; }
.man-doc li { margin-bottom: .3rem; }
.man-doc li > p { margin-bottom: .3rem; }
.man-doc ol > li::marker { font-weight: 650; color: #475467; }
.man-doc strong { font-weight: 650; color: #111827; }
.man-doc code { font-size: .86em; color: #9a3412; background: #fdf4ec; padding: .05em .3em; border-radius: 4px; }
.man-doc a { color: var(--blue-deep); }

/* screenshots */
.man-fig { margin: 1.1rem 0 1.5rem; text-align: center; }
.man-fig a { display: inline-block; max-width: 100%; border-radius: 10px; cursor: zoom-in; }
.man-fig img {
  max-width: 100%; height: auto; border-radius: 10px; border: 1px solid #d5dbe3; background: #f5f6f8;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 2px 4px rgba(15, 23, 42, .06), 0 14px 30px -16px rgba(15, 23, 42, .35);
}
.man-fig-narrow img { max-width: min(100%, 380px); }
.man-fig figcaption { margin-top: .55rem; font-size: .8rem; color: var(--muted); line-height: 1.4; max-width: 720px; margin-left: auto; margin-right: auto; }

/* notes, tips, warnings, examples */
.man-callout {
  margin: 1rem 0 1.2rem; padding: .75rem 1rem .1rem; border-radius: 10px; border: 1px solid; border-left-width: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 6px 14px -12px rgba(15, 23, 42, .3); font-size: .92rem;
}
.man-callout-t { font-weight: 700; font-size: .82rem; margin-bottom: .3rem; display: flex; align-items: center; gap: .4rem; }
.man-callout p { margin-bottom: .65rem; }
.man-note { background: #f1f6ff; border-color: #cfe0fb; border-left-color: #0d6efd; }
.man-note .man-callout-t { color: #0b5ed7; }
.man-tip { background: #effaf3; border-color: #cbead6; border-left-color: #198754; }
.man-tip .man-callout-t { color: #146c43; }
.man-important { background: #fff8eb; border-color: #f4dfb2; border-left-color: #e0a100; }
.man-important .man-callout-t { color: #9a6700; }
.man-example { background: #f6f7fb; border-color: #dfe3ee; border-left-color: #6c7a96; }
.man-example .man-callout-t { color: #475467; }

/* tables */
.man-table { margin: .9rem 0 1.3rem; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.man-table table { margin: 0; font-size: .87rem; }
.man-table thead th {
  background: linear-gradient(180deg, #f8f9fb, #eef1f5); color: #344054; font-weight: 650; border-bottom: 1px solid var(--line);
  white-space: nowrap; padding: .5rem .7rem;
}
.man-table td { padding: .45rem .7rem; vertical-align: top; border-color: var(--line-soft); }
.man-table tbody tr:last-child td { border-bottom: 0; }
.man-table td:first-child { color: #18212b; }

/* next and previous chapter */
.man-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-soft); }
.man-pg {
  display: flex; flex-direction: column; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
  box-shadow: var(--raise-1); color: var(--ink); max-width: 48%;
}
.man-pg:hover { text-decoration: none; border-color: #c9d6ea; background: #fff; }
.man-pg span { font-size: .75rem; color: var(--muted); }
.man-pg strong { color: var(--blue-deep); font-weight: 650; }
.man-pg-next { margin-left: auto; text-align: right; }

/* on this page */
.man-onpage { position: sticky; top: calc(var(--bar-h) + 1.25rem); width: 230px; flex: none; max-height: calc(100vh - var(--bar-h) - 2.5rem); overflow-y: auto; font-size: .8rem; }
.man-onpage-t { font-weight: 650; color: #344054; margin-bottom: .45rem; }
.man-onpage a { display: block; padding: .25rem .6rem; color: var(--ink-soft); border-left: 2px solid var(--line); line-height: 1.3; }
.man-onpage a:hover { color: #111827; text-decoration: none; border-left-color: #adb5bd; }
.man-onpage a.is-here { color: var(--blue-deep); border-left-color: var(--blue); font-weight: 600; }
.man-onpage .man-top { margin-top: .6rem; border-left-color: transparent; color: var(--muted); }
@media (max-width: 1399.98px) { .man-onpage { display: none; } }

/* enlarged screenshot */
.man-zoom-modal .modal-dialog { max-width: min(1180px, 96vw); }
.man-zoom-modal img { max-width: 100%; height: auto; border-radius: 6px; }

/* ------------------------------------------------------------------ phones and tablets */
@media (max-width: 767.98px) {
  .man-doc { padding: 1.1rem 1rem 1rem; font-size: .93rem; border-radius: 10px; }
  .man-doc h2 { font-size: 1.2rem; margin-top: 2rem; }
  .man-doc h3 { font-size: 1.05rem; }
  .man-fig { margin-left: -.35rem; margin-right: -.35rem; }
  .man-fig img { border-radius: 7px; }
  .man-pager { flex-direction: column; }
  .man-pg { max-width: none; }
  .man-results { position: fixed; left: 12px; right: 12px; top: auto; min-width: 0; }
}
@media (max-width: 767.98px) {
  body.manual .app-bar .company { display: inline; padding-left: .6rem; white-space: nowrap; }
}
@media (max-width: 575.98px) {
  body.manual .app-bar .navbar-brand { margin-right: 0; }
}

/* ------------------------------------------------------------------ printing a chapter */
@media print {
  body.manual { background: #fff; }
  .man-main { padding: 0 !important; }
  .man-main .page-bar { box-shadow: none; border: 0; padding: 0 0 .5rem; background: none; }
  .man-doc { border: 0; box-shadow: none; padding: 0; max-width: none; font-size: 10.5pt; }
  .man-print-head { display: block; font-size: 9pt; color: #6c757d; margin-bottom: .3rem; }
  .man-hash { display: none; }
  .man-fig, .man-callout, .man-table, tr { break-inside: avoid; }
  .man-doc h2, .man-doc h3, .man-doc h4 { break-after: avoid; }
  .man-fig img { box-shadow: none; max-height: 20cm; width: auto; }
  .man-table { box-shadow: none; }
  .man-doc a { color: inherit; }
}
