/* ---------------------------------------------------------
   AI4POS MANUAL — FIX COVER PAGE LAYOUT
   Applies ONLY to index.md (Cover Page) 
--------------------------------------------------------- */

/* Expand article width on homepage but DO NOT center everything */
[data-md-component="content"] article.md-content__inner {
    max-width: 100% !important;
    width: 100%;
}

/* Center ONLY headings inside the content area */
[data-md-component="content"] article.md-content__inner h1,
[data-md-component="content"] article.md-content__inner h2 {
    text-align: center !important;
}

/* Cover image container */
.cover-wrapper {
  display: flex;
  justify-content: center;
  margin: 2.5rem auto;

  /* Two-layer shadow: deep base + indigo glow */
  filter:
    drop-shadow(0 18px 28px rgba(0,0,0,0.35))        /* deep realistic shadow */
    drop-shadow(0 10px 22px rgba(63,81,181,0.40));  /* indigo glow shadow */
}

/* Cover image style */
.cover-image {
  width: 420px;
  height: auto;
  display: block;
}


/* ---------------------------------------------------------
   PDF ICON FIX — Align properly and shrink SVG
--------------------------------------------------------- */

/* Always align PDF icon right */
.md-content .md-content__button,
.md-content .md-typeset .md-content__button {
    float: right !important;
    text-align: right !important;
    /* display: inline-block !important; */
}

/* Ensure PDF icon SVG is the correct size */
.md-content .md-content__button svg {
    width: 1.3rem !important;
    height: 1.3rem !important;
}

/* Prevent heading centering from affecting floated PDF buttons */
.md-content h1,
.md-content h2 {
    position: relative;
}

/* Move PDF icon upward specifically on the cover page */
.md-content .md-content__button {
    margin-top: -32px !important;    /* upward tweak */
    margin-right: 4px !important;    /* spacing */
}

/* Custom PDF button in header */
.pdf-global-button {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 20; /* ensure always visible */
}

/* Match Material icon style */
.pdf-global-button svg {
    width: 22px;
    height: 22px;
    fill: var(--md-primary-fg-color);
}

/* Hide built-in PDF icon inside page content */
.md-content__button.md-icon {
    display: none !important;
}

/* Footer alignment */
.md-footer {
    text-align: center;
}

/* Slight title size adjustment */
.md-header__title {
    font-size: 1.2rem;
}


/* ---------------------------------------------------------
   FIX HEADER LOGO POSITIONING FOR AI4POS MANUAL
--------------------------------------------------------- */

/* Ensure header items align properly */
.md-header__inner {
    display: flex;
    align-items: center;
}

/* Logo container next to title */
.custom-logo {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
}

/* Make sure the logo image scales properly */
.custom-logo img {
    height: 34px;   /* tuned to match header height */
    width: auto;
    display: block;
}

/* Proper spacing between logo and title text */
.md-header__title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}


/* ---------------------------------------------------------
   FORCE-HIDE SIDEBARS ON HOMEPAGE (WORKS 100% IN MKDOCS)
--------------------------------------------------------- */

/*
   The presence of .cover-wrapper uniquely identifies index.md,
   so we use :has() to hide sidebars only on the homepage.
*/

/* Detect homepage & hide both sidebars */
body:has(.cover-wrapper) .md-sidebar--primary,
body:has(.cover-wrapper) .md-sidebar--secondary {
    display: none !important;
}

/* Remove left margin when sidebars vanish */
body:has(.cover-wrapper) .md-content {
    margin-left: 0 !important;
}


/* ---------------------------------------------------------
   HOMEPAGE CONTENT CENTERING FIX
   Centers headings + image together without affecting other pages
--------------------------------------------------------- */

body:has(.cover-wrapper) .md-content__inner {
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center;
    text-align: center !important;
}

/* Ensure the cash register container spans full width and centers */
body:has(.cover-wrapper) .cover-wrapper {
    width: 100%;
    display: flex;
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* --------- Page-specific header --------- */
.manual-page-header {
    background: #1e3a8a;
    color: white;
    padding: 10px 0;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    border-radius: 10px;
}

/* --------- Page-specific footers --------- */
.page-footer {
    text-align: center;
    margin-top: 25px;
    color: #777;
    font-size: 0.60rem;
    line-height: 1.4;
}

.page-footer-separator {
    margin-top: 3rem;
    border: none;
    border-top: 1px solid var(--md-default-fg-color--lighter);
}

/* Completely hide Material's built-in footer container */
.md-footer, 
.md-footer-meta {
    display: none !important;
}

/* Center An Image */
img[src*="#center"] {
    display: block;
    margin: auto;
}
