/**
 * 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: #28a745;
  --bs-secondary: #1d646a;
  --bs-info: #40b0ae;
  --bs-success: #0aa05c;
  --bs-warning: #e1ca0a;
  --bs-danger: #f01704;
  --bs-pmf-nav: #20373c;
  --bs-pmf-footer: #C7C7C7;
  --bs-pmf-background: #9eb6c9;
  --bs-body-bg: #ffffff;
  --bs-body-color: #212529;
  --bs-link-color: #729576;
  --bs-link-hover-color: #5f7f63;
}

[data-bs-theme='dark'] {
  --bs-light: #eceff9;
  --bs-dark: #060508;
  --bs-primary: #28a745;
  --bs-secondary: #1d646a;
  --bs-info: #40b0ae;
  --bs-success: #0aa05c;
  --bs-warning: #e1ca0a;
  --bs-danger: #f01704;
  --bs-pmf-nav: #20373c;
  --bs-pmf-footer: #000000;
  --bs-pmf-background: #9eb6c9;
  --bs-body-bg: #ffffff;
  --bs-body-color: #212529;
  --bs-link-color: #729576;
  --bs-link-hover-color: #5f7f63;
}

[data-bs-theme='high-contrast'] {
  --bs-light: #eceff9;
  --bs-dark: #060508;
  --bs-primary: #28a745;
  --bs-secondary: #1d646a;
  --bs-info: #40b0ae;
  --bs-success: #0aa05c;
  --bs-warning: #e1ca0a;
  --bs-danger: #f01704;
  --bs-pmf-nav: #20373c;
  --bs-pmf-footer: #000000;
  --bs-pmf-background: #9eb6c9;
  --bs-body-bg: #ffffff;
  --bs-body-color: #212529;
  --bs-link-color: #729576;
  --bs-link-hover-color: #5f7f63;
}

.btn-primary {
  --bs-btn-bg: #28a745;
  --bs-btn-border-color: #28a745;
  --bs-btn-hover-bg: #218838;
  --bs-btn-hover-border-color: #1e7e34;
  --bs-btn-active-bg: #1e7e34;
  --bs-btn-active-border-color: #1c7430;
  --bs-btn-disabled-bg: #28a745;
  --bs-btn-disabled-border-color: #28a745;
}


main a:not(.btn),
#wrapper a:not(.btn) {
  color: #729576;
}

main a:not(.btn):hover,
main a:not(.btn):focus,
#wrapper a:not(.btn):hover,
#wrapper a:not(.btn):focus {
  color: #5f7f63;
}


/* FAQ images inside articles */
.pmf-faq-body .faq-lightbox-image {
  display: block;
  width: auto;
  max-width: 80%;
  max-height: 650px;
  height: auto;
  object-fit: contain;
  margin: 1.75rem auto;

  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 14px;

  box-shadow:
    0 10px 24px rgba(32, 55, 60, 0.16),
    0 3px 8px rgba(32, 55, 60, 0.10);

  cursor: zoom-in;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.pmf-faq-body .faq-lightbox-image:hover {
  transform: translateY(-6px) scale(1.01);

  box-shadow:
    0 20px 40px rgba(32, 55, 60, 0.22),
    0 8px 16px rgba(32, 55, 60, 0.14);
}

/* Full-screen lightbox */
.faq-image-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 40px;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
}

.faq-image-lightbox.is-open {
  display: flex;
}

.faq-image-lightbox img {
  display: block;
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  padding: 0;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.faq-image-lightbox-close {
  position: absolute;
  top: 15px;
  right: 25px;
  z-index: 10000;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
}

/* Mobile sizing */
@media (max-width: 767.98px) {
  .pmf-faq-body .faq-lightbox-image {
    max-width: 100%;
    max-height: 500px;
    padding: 5px;
  }

  .faq-image-lightbox {
    padding: 20px;
  }
}

main a:not(.btn),
#wrapper a:not(.btn) {
  color: #729576;
  text-decoration: none;
}

main a:not(.btn):hover,
main a:not(.btn):focus,
#wrapper a:not(.btn):hover,
#wrapper a:not(.btn):focus {
  color: #5f7f63;
  text-decoration: none;
}