/**
 * phpMyFAQ 4.0 default theme
 *
 * This Source Code Form is subject to the terms of the Mozilla Public License,
 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
 * obtain one at https://mozilla.org/MPL/2.0/.
 *
 * @package   phpMyFAQ
 * @author    Thorsten Rinne <thorsten@phpmyfaq.de>
 * @copyright 2024-2025 phpMyFAQ Team
 * @license   https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
 * @link      https://www.phpmyfaq.de
 * @since     2024-09-01
 */

/* Font -Atkinson Hyperlegible Next- from Braille Institute for high-contrast mode to achieve better A11y */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('../../fonts/AtkinsonHyperlegibleNext-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('../../fonts/AtkinsonHyperlegibleNext-Italic-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root,
[data-bs-theme='light'] {
  --bs-light: #eceff9;
  --bs-dark: #060508;
  --bs-primary: #083c83;
  --bs-secondary: #1d646a;
  --bs-info: #40b0ae;
  --bs-success: #0aa05c;
  --bs-warning: #e1ca0a;
  --bs-danger: #f01704;
  --bs-pmf-nav: #2f3035;
  --bs-pmf-footer: #142f48;
  --bs-pmf-background: #9eb6c9;

  /* Bootstrap body variables for light mode */
  --bs-body-bg: #ffffff;
  --bs-body-color: #212529;
}

[data-bs-theme='dark'] {
  --bs-light: #eceff9;
  --bs-dark: #060508;
  --bs-primary: #083c83;
  --bs-secondary: #1d646a;
  --bs-info: #40b0ae;
  --bs-success: #0aa05c;
  --bs-warning: #e1ca0a;
  --bs-danger: #f01704;
  --bs-pmf-nav: #2f3035;
  --bs-pmf-footer: #142f48;
  --bs-pmf-background: #9eb6c9;

  /* Bootstrap body variables for dark mode */
  --bs-body-bg: var(--bs-dark);
  --bs-body-color: var(--bs-light);
}

[data-bs-theme='high-contrast'] {
  --bs-light: #ffffff;
  --bs-dark: #000000;
  --bs-primary: #ffff00;
  --bs-secondary: #00ffff;
  --bs-info: #00ffff;
  --bs-success: #00ff00;
  --bs-warning: #ffff00;
  --bs-danger: #ff0000;
  --bs-pmf-nav: #000000;
  --bs-pmf-footer: #000000;
  --bs-pmf-background: #000000;

  /* Bootstrap body variables for high contrast mode */
  --bs-body-bg: #000000;
  --bs-body-color: #ffffff;
  --bs-border-color: #ffffff;
  --bs-link-color: #ffff00;
  --bs-link-hover-color: #ffff66;

  /* Individual high-contrast adjustments */

  body {
    font-family: 'Atkinson Hyperlegible Next' !important;
    font-size: 1.3rem;
    font-optical-sizing: auto;
    font-weight: 800;
    font-style: normal;
  }
}

/* =====================================================================
 * Tema Blumatica (porting della grafica del tema 2.7 "Blumatica")
 * Colori presi dal tema 2.7: fondo #153c59, verde acqua #1caea6,
 * blu menu #156ba0, blu titoli #1d7ab3, colonna destra #fbfbfb.
 * Immagini e icone: cartella images/ nella radice delle FAQ.
 * ===================================================================== */

:root,
[data-bs-theme='light'] {
  --bluma-fondo: #153c59;
  --bluma-teal: #1caea6;
  --bluma-menu: #156ba0;
  --bluma-titoli: #1d7ab3;
  --bluma-chiaro: #d5f1fc;
  --bs-primary: #1d7ab3;
  --bs-primary-rgb: 29, 122, 179;
  --bs-secondary: #156ba0;
  --bs-info: #1caea6;
  --bs-link-color: #1d7ab3;
  --bs-link-color-rgb: 29, 122, 179;
  --bs-link-hover-color: #156ba0;
  --bs-link-hover-color-rgb: 21, 107, 160;
  --bs-pmf-nav: #153c59;
  --bs-pmf-footer: #153c59;
  --bs-pmf-background: #153c59;
  --bs-body-font-family: Tahoma, 'Trebuchet MS', Geneva, Verdana, Arial, Helvetica, sans-serif;
}

html,
body.pmf-template-blumatica {
  background: var(--bluma-fondo);
}

.pmf-template-blumatica h1,
.pmf-template-blumatica h2,
.pmf-template-blumatica h3,
.pmf-template-blumatica h4,
.pmf-template-blumatica h5 {
  font-family: Kanit, sans-serif;
  font-weight: normal;
  color: var(--bluma-titoli);
}

.pmf-template-blumatica .btn-primary {
  --bs-btn-bg: var(--bluma-teal);
  --bs-btn-border-color: var(--bluma-teal);
  --bs-btn-hover-bg: #179089;
  --bs-btn-hover-border-color: #179089;
  --bs-btn-active-bg: #179089;
}

/* Impianto: larghezza come la 2.7 (1000-1200 px), poi responsive */
.bluma-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

/* Intestazione */
.bluma-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 150px;
  padding: 20px 0 30px 20px;
}

.bluma-logo img {
  max-width: 100%;
  height: auto;
}

.bluma-topnav {
  list-style: none;
  margin: 17px 0 0 0;
  padding: 0;
  display: flex;
  background: var(--bluma-teal);
}

.bluma-topnav a {
  display: block;
  padding: 20px 17px 16px 15px;
  color: #eaf3f8;
  font-family: Kanit, sans-serif;
  font-size: 15px;
  text-decoration: none;
}

.bluma-topnav a:hover {
  color: #fff;
}

.bluma-topnav img {
  margin-right: 6px;
  vertical-align: middle;
}

.bluma-toggler {
  color: #fff;
  font-size: 2rem;
  border: 0;
  margin-top: 17px;
}

/* Corpo bianco a colonne */
.bluma-columns {
  display: flex;
  background: #fff;
  min-height: 300px;
}

.bluma-sidebar {
  flex: 0 0 200px;
  width: 200px;
}

.bluma-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 20px 20px 30px 20px;
}

/* Menu sinistro a blocchi blu */
.bluma-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bluma-menu a {
  display: block;
  padding: 10px 8px 10px 8px;
  background: var(--bluma-menu);
  border-bottom: 1px solid #fff;
  color: #fff;
  font-family: Kanit, sans-serif;
  font-size: 18px;
  letter-spacing: 0.7px;
  text-decoration: none;
}

.bluma-menu a:hover,
.bluma-menu a.active {
  background: var(--bluma-titoli);
  color: #fff;
}

.bluma-menu img {
  width: 20px;
  margin-right: 8px;
  vertical-align: -2px;
}

/* Ricerca nella colonna sinistra */
.bluma-search {
  padding: 20px 8px 25px 8px;
}

.bluma-search form {
  display: flex;
}

.bluma-search input {
  border-radius: 0;
  background: #eee;
  border: 0;
  font-size: 13px;
}

.bluma-search-btn {
  border: 0;
  background: #eee;
  color: #555;
  padding: 0 10px;
}

/* Titoli e briciole di pane come la 2.7 */
.pmf-template-blumatica .bluma-main h1,
.pmf-template-blumatica .bluma-main h2 {
  font-size: 1.9rem;
  line-height: 1.5;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--bluma-menu);
  margin-bottom: 20px;
}

.pmf-template-blumatica .breadcrumb-item a,
.pmf-template-blumatica .breadcrumb-item {
  background: #eee;
  padding: 2px 5px;
  font-size: 12px;
}

/* Box laterali (colonna destra delle pagine) come la 2.7 */
.pmf-template-blumatica .card {
  border-radius: 0;
  border: 0;
  border-top: 3px solid var(--bluma-teal);
  background: #fbfbfb;
  box-shadow: none !important;
}

.pmf-template-blumatica .card-title {
  color: var(--bluma-teal);
  font-family: Tahoma, 'Trebuchet MS', Geneva, Verdana, Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: bold;
}

/* Piede pagina */
.bluma-footer {
  padding: 25px 0 30px 0;
  text-align: center;
  color: #aaa;
  font-size: 12px;
}

.bluma-footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 8px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.bluma-footer a {
  color: #8fb8d6;
  text-decoration: none;
}

.bluma-footer a:hover {
  color: #fff;
}

/* Schermi stretti: menu sinistro richiudibile sotto l'intestazione */
@media (max-width: 991.98px) {
  .bluma-columns {
    flex-direction: column;
  }

  .bluma-sidebar {
    width: 100%;
    flex-basis: auto;
  }

  .bluma-topnav {
    width: 100%;
    flex-wrap: wrap;
  }

  .bluma-header {
    padding-left: 0;
  }
}

/* Ritocchi dopo il confronto a vista con la 2.7 */
.bluma-topnav img {
  height: 20px;
  width: auto;
}

.pmf-template-blumatica .pmf-start-page {
  background: none;
  -webkit-text-fill-color: var(--bluma-titoli);
  color: var(--bluma-titoli);
}

.pmf-template-blumatica .bluma-main a {
  text-decoration: none;
}

.pmf-template-blumatica .bluma-main a:hover {
  text-decoration: underline;
}

/* BLUMATICA: i suggerimenti della ricerca si aprono sotto la casella della colonna sinistra (200 px):
   li allarghiamo, altrimenti il testo va a capo a ogni parola. */
.pmf-template-blumatica ul.autocomplete {
  min-width: min(520px, calc(100vw - 32px)) !important;
  max-height: 70vh;
  overflow-y: auto;
  font-size: 14px;
}

.pmf-template-blumatica ul.autocomplete .list-group-item {
  padding: 6px 10px;
}
