/* =========================================================
   INNOMAG Guideline - shared HTML styles
   ========================================================= */


/* ---------------------------------------------------------
   Sidebar navigation tools: language + PDF + GitHub
   --------------------------------------------------------- */

/* Common button style */
a.quarto-navigation-tool[href$=".pdf"],
a.quarto-navigation-tool[aria-label="English"],
a.quarto-navigation-tool[aria-label="Deutsch"],
.sidebar-tools-main a:has(.bi-github) {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: 1.2rem;
  margin-right: 0.4rem;

  height: 30px;
  box-sizing: border-box;

  padding: 0 0.65rem;

  border: 1px solid #000000;
  border-radius: 0.3rem;

  text-decoration: none;
  font-weight: 500;
}


/* Explicit order:
   Language -> PDF -> GitHub
*/
a.quarto-navigation-tool[aria-label="English"],
a.quarto-navigation-tool[aria-label="Deutsch"] {
  order: 1;
}

a.quarto-navigation-tool[href$=".pdf"] {
  order: 2;
}

.sidebar-tools-main a:has(.bi-github) {
  order: 3;
  margin-right: 0;
}


/* ---------------------------------------------------------
   Hide original icons for language and PDF buttons
   --------------------------------------------------------- */

a.quarto-navigation-tool[href$=".pdf"] i,
a.quarto-navigation-tool[aria-label="English"] i,
a.quarto-navigation-tool[aria-label="Deutsch"] i {
  display: none !important;
}

/* =========================================================
   SIDEBAR BUTTONS - Common styling
   ========================================================= */

.sidebar-tools-main a.quarto-navigation-tool {
    background-color: #f2f2f2;
    color: #333333;
    border: 1px solid #888888;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover effect for all buttons */
.sidebar-tools-main a.quarto-navigation-tool:hover {
    background-color: #44BDB2 !important;
    color: #ffffff !important;
    border-color: #44BDB2 !important;
}


/* =========================================================
   1. ENGLISH BUTTON - British flag
   ========================================================= */

.sidebar-tools-main a.quarto-navigation-tool[aria-label="English"] {
    font-size: 0;
    min-width: 42px;

    background-image: url("figures/webpage/flag-gb.svg");
    background-size: 24px 16px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hide original translation icon */
.sidebar-tools-main a.quarto-navigation-tool[aria-label="English"] .bi {
    display: none;
}


/* =========================================================
   2. PDF-WEB BUTTON
   ========================================================= */

.sidebar-tools-main a.quarto-navigation-tool[href$="Innomag-Guideline-de-web.pdf"] {
    font-size: 0;
}

.sidebar-tools-main a[href$="Innomag-Guideline-de-web.pdf"]::after {
    content: "PDF-web";
    font-size: 0.8rem;
    line-height: 1;
}


/* =========================================================
   3. PDF-HQ BUTTON
   ========================================================= */

.sidebar-tools-main a.quarto-navigation-tool[href$="Innomag-Guideline-de.pdf"] {
    font-size: 0;
}

.sidebar-tools-main a[href$="Innomag-Guideline-de.pdf"]::after {
    content: "PDF-HQ";
    font-size: 0.8rem;
    line-height: 1;
}


/* =========================================================
   4. GITHUB BUTTON
   ========================================================= */

.sidebar-tools-main a.quarto-navigation-tool:has(.bi-github) {
    min-width: 36px;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    color: #333333;
}

.sidebar-tools-main .bi-github {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    margin: 0;
}


/* =========================================================
   BUTTON ALIGNMENT
   ========================================================= */

.sidebar-tools-main {
    display: flex;
    width: 100%;
    gap: 1px;
    align-items: center;
}

.sidebar-tools-main a.quarto-navigation-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* =========================================================
   Hide keywords in HTML title block
   ========================================================= */

#title-block-header .keywords {
    display: none;
}



/* ---------------------------------------------------------
   Tables
   --------------------------------------------------------- */


/* ---------------------------------------------------------
   Zebra tables - gray
   --------------------------------------------------------- */

/* Font size */
table.zebra,
.zebra table {
  font-size: 0.90em;
}

/* Cell padding */
table.zebra th,
table.zebra td,
.zebra table th,
.zebra table td {
  padding: 0.30rem 0.55rem;
}

/* Header */
table.zebra thead,
.zebra table thead {
  background-color: #e2e2e2;
}

/* Odd rows */
table.zebra tbody tr:nth-child(odd),
.zebra table tbody tr:nth-child(odd) {
  background-color: #f8f8f8;
}

/* Even rows */
table.zebra tbody tr:nth-child(even),
.zebra table tbody tr:nth-child(even) {
  background-color: #eeeeee;
}


/* ---------------------------------------------------------
   Zebra tables - blue
   --------------------------------------------------------- */

/* Font size */
table.zebra_blue,
.zebra_blue table {
  font-size: 0.90em;
}

/* Cell padding */
table.zebra_blue th,
table.zebra_blue td,
.zebra_blue table th,
.zebra_blue table td {
  padding: 0.30rem 0.55rem;
}

/* Header */
table.zebra_blue thead,
.zebra_blue table thead {
  background-color: #d7e6f3;
}

/* Odd rows */
table.zebra_blue tbody tr:nth-child(odd),
.zebra_blue table tbody tr:nth-child(odd) {
  background-color: #f4f8fc;
}

/* Even rows */
table.zebra_blue tbody tr:nth-child(even),
.zebra_blue table tbody tr:nth-child(even) {
  background-color: #e6f0f8;
}


/* ---------------------------------------------------------
   Hide automatically generated date and DOI metadata
   --------------------------------------------------------- */

.quarto-title-meta > div:has(.date),
.quarto-title-meta > div:has(.doi) {
  display: none;
}

/* ---------------------------------------------------------
   INNOMAG Guideline Logo
   --------------------------------------------------------- */

.sidebar-logo-link {
    display: flex;
    width: 100%;
    justify-content: center;
}

.sidebar-logo {
    width: 80% !important;
    max-width: 250px !important;
    height: auto !important;
    margin: 0 !important;
}
