/*
 * CUSTOM.CSS nimmt die zusätzlichen Elemente auf. Die Datei wird aktuell als vorletztes CSS geladen
 *  und überschreibt somit die Einstellungen aus dem Theme. Hier ist die Stelle für Anpassungen.
 * 
 */

/*
 * BODY
 */
a {
  border-bottom: 1px solid var(--tertiary-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--tertiary-color);
}

.dark a:hover {
  border-bottom-color: var(--link-color);
}


/* Schrift verkleinern auf 0.8em */
.small08 {
  font-size: 0.8em;
}

.small09 {
  font-size: 0.9em;
}

.floatright {
  float: right;
}

.floatleft {
  float: left;
}

.clearboth {
  clear: both;
}

/*
 * HEADER
 */

/* Anpassungen <header> im Zusammenspiel mit .subnav */
header {
  border: none;
  margin: 1rem 0 0rem;
  padding-bottom: 0.5rem;
}

.above-the-list-header {
  font-size: 1.2em;
}


.below-the-list-intro {
  color: var(--tertiary-color);
  font-size: 1.2em;
  font-weight: bold;
}


.wappen,
.screenshot,
.margin0 {
  margin: 0;
}


.pikto {
  margin: 5px 5px 0 0;
  max-width: 150px;
}

/*
https://www.mediaevent.de/css/box-shadow.html

.shadow {
       horizontaler    vertikaler 
       Versatz   ┐   ┌ Versatz
                 │   │
                 ▼   ▼
    box-shadow: 3px 5px 10px hsla(0,0%,0%,0.5);
                          ▲    ▲
                          │    │
         Unschärfenradius ┘    └ Farbe des Schattens
}
*/

img .screenshot {
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
  margin: 0;
}

figure {}

figcaption {
  font-size: 0.8em;
  /*font-weight: bold;*/
  text-align: left;
}

figcaption ::before {
  /*font-weight: bold;*/
  content: "(🔍 Abbildung vergrößern) ⇢ "
    /* ↳  */
}

/*
 * FOOTER
 */

/* 
 * Footer Menü bzw. Footer grid:
 * Baut den Footerbereich als zweite Navigation auf 
 */

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  /* Abstand oberhalb des Footer-Menüs */
  margin-bottom: 2rem;
}

.footer-col h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-col ul li:before {
  content: "";
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

.footer-col ul li a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-col ul li a:hover,
.footer-col li a:hover {
  color: var(--link-color);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--primary-color);
  /* optional: obere Trennlinie */
  padding-top: 2rem;
  margin-top: 3rem;
  /* Abstand vom Hauptinhalt */
}

.footer-col {
  flex: 1;
  line-height: 0.8em;
  padding: 0 1rem;
  border-left: 1px solid var(--primary-color);
}

/* Erste Spalte ohne linke Linie */
.footer-col:first-child {
  border-left: none;
}

.footer-col li a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: none !important;
  word-break: break-word;
  word-wrap: break-word;
  overflow: break-word;
  display: inline-block;
  padding-left: 0.3rem;
  /* optional für zusätzliche visuelle Einrückung */
}

/* Mobile-responsive footer styles */
.footer-section-title {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.footer-toggle {
  float: right;
  font-weight: bold;
  font-size: 1.2em;
  display: none;
  /* Hidden by default, shown on mobile */
  line-height: 1;
  transition: transform 0.2s ease;
}

.footer-section-title.active {
  color: var(--link-color);
}

.footer-section-title.active .footer-toggle {
  transform: rotate(45deg);
}

.meta a {
  background: var(--set-transparent);
  border: 0px solid var(--set-transparent);
  color: var(--link-color);
}

.meta a:hover {
  background: var(--tertiary-color);
  border: 0px solid var(--set-transparent);
  color: var(--secondary-color);
}

.meta-tag-icon {
  color: var(--link-color);
}

.top-anchor {}


/*
 * MAIN MENU
 */

/* Submenu Styles */
.has-submenu {
  position: relative;
}

.submenu-indicator {
  margin-left: 0.5em;
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.has-submenu.submenu-open .submenu-indicator {
  transform: rotate(180deg);
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--secondary-color);
  border: 1px solid var(--tertiary-color);
  border-radius: var(--radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  min-width: 250px;
  z-index: 1000;
  display: none;
  padding: 0;
}

.submenu-content {
  padding: 1rem;
}

.submenu-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  color: var(--primary-color);
  border-bottom: 1px solid var(--tertiary-color);
  padding-bottom: 0.5rem;
}

.submenu-title::before {
  content: none !important;
}

.submenu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.submenu-list li {
  margin: 0;
  padding: 0.25rem 0;
}

.submenu-list li::before {
  content: none !important;
}

.submenu-list a {
  display: block;
  padding: 0.5rem;
  text-decoration: none;
  border-radius: 4px;
  border-bottom: none !important;
  transition: background-color 0.2s ease;
  color: var(--primary-color);
}

.submenu-list a:hover {
  background-color: var(--code-bg);
  color: var(--link-color);
}

.submenu-type {
  font-size: 0.7rem;
  color: var(--tertiary-color);
  background: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.5rem;
}

.submenu-section .submenu-type {
  background: #e3f2fd;
  color: #1976d2;
}

.submenu-page .submenu-type {
  background: #f3e5f5;
  color: #7b1fa2;
}

.submenu-separator {
  height: 1px;
  background: var(--tertiary-color);
  margin: 0.5rem 0;
  border: none;
}


/* 
 * .subnav wird am Desktop verwendet um hinter dem Link anzuzeigen, ob 
 * es eine komplette Sektion oder nur eine Seite ist:
 *  - subnav.html
 *  - header.html 
 */

/* NAVIGATION: .SUBNAV */
/* Entfernt globale Spiegelstriche */
.subnav ul li::before {
  content: none !important;
}

.subnav {
  background-color: var(--set-transarent);
  padding: 0 1rem 0.5rem 1rem;
  border-bottom: 1px solid #ccc;
  font-size: 0.85rem;
  overflow-x: auto;
}

.subnav ul {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subnav li {
  margin: 0;
  white-space: nowrap;
}

/* Enhanced Menu Styles */
.has-submenu {
  position: relative;
}

.submenu-indicator {
  margin-left: 0.5em;
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.submenu-open .submenu-indicator {
  transform: rotate(180deg);
}

.has-submenu.submenu-open>a {
  background-color: var(--code-bg);
  color: var(--link-color);
  border-radius: 4px 4px 0 0;
  position: relative;
  z-index: 1001;
}


/* Enhanced Subnav Styles */
.subnav-section,
.subnav-page {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subnav-type {
  font-size: 0.7rem;
  color: var(--tertiary-color);
  background: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.5rem;
}

.subnav-section .subnav-type {
  background: #e3f2fd;
  color: #1976d2;
}

.subnav-page .subnav-type {
  background: #f3e5f5;
  color: #7b1fa2;
}

.subnav-separator {
  height: 1px;
  background: var(--tertiary-color);
  margin: 0.5rem 0;
  border: none;
}



/* Animation for expanding menus */
@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }

  to {
    opacity: 1;
    max-height: 300px;
  }
}

/*
 * TABELLEN / GRID
 */

/* Grid Tabelle mit 2 Spalten */
.twc_wrapper {
  display: flex;
  flex-direction: column;
  /* gap: 0.5em; wird in params.toml gesetzt! */
  margin-top: 1.2em;
}

.twc_row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  word-wrap: break-word;
  word-break: break-word;
}

.twc_column {
  padding: 0.25em 0.5em;
  box-sizing: border-box;
}

.twc_column-label {
  flex: 0 0 30%;
  font-weight: bold;
  word-break: break-word;
}

.twc_column-content {
  flex: 1 0 70%;
  word-break: break-word;
}

.twc_visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Optional verwendbare Klassen */
.twc_row.highlight {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding-left: 0.75em;
}

.twc_row.muted {
  color: #666;
  font-style: italic;
}

/* Elemente zum Erstellen von Tabellen */

.hitflexgrid_wrapper {
  display: grid;
  grid-template-columns: repeat(var(--hitflexgrid-columns), 1fr);
  gap: var(--hitflexgrid-gap, 0.5em);
  margin-bottom: 1em;
}

.hitflexgrid_row {
  display: contents;
}

.hitflexgrid_cell {
  padding: 0.5em;
  box-sizing: border-box;
  word-break: break-word;
  vertical-align: top;
  border-bottom: 1px solid #ccc;
}

.hitflexgrid_cell[role="columnheader"] {
  font-weight: bold;
  background: #f0f0f0;
  border-bottom: 2px solid #999;
}


/* SHORTCODES
 * Areas
 */

/* callout  */
.callout {
  align-items: unset;
  background: var(--secondary-color);
  border: 1px solid var(--tertiary-color);
  box-shadow: none;
  color: var(--tertiary-color);
}

.shine {
  align-items: unset;
  background: var(--tertiary-color);
  color: var(--secondary-color);
  border: 1px solid var(--tertiary-color);
  box-shadow: none;
  margin: 10px 5px;
  padding: 10px 15px;
}

.redalert {
  background: var(--tertiary-color);
  color: var(--secondary-color);
}

details {
  background: var(--set-transparent);
  margin-bottom: 25px;
  ;
}

summary {
  cursor: pointer;
}

/*
summary::after {
  color: var(--tertiary-color);
  content: ' ⭭';
  font-size: 1.4em;;
}*/

/*a::after {
  content: ' ↗';
  font-size: 0.8em;
}*/

.title::after,
.main-menu-link::after,
.footer-menu-link::after,
.footer-menu-link a::after,
.footer-to-top::after,
.next::after,
.prev::after,
.toc-innr a::after,
.breadcrumbs a::after,
.subnav a::after,
.mobile-submenu a::after,
.tag::after,
.lightbox-image::after,
/**/
.mobile-submenu a::before {
  /* exkludiert von Class*/
  content: '';
}


/*
 *
 */


.showmore {
  /* mehr... auf der News Seite. definiert in recents.html  */
  margin: 1.2rem 0;
}

.showmore button {
  border-radius: none;
}


/*
 * SCROLLBAR
 */
::-webkit-scrollbar {
  width: 0.8vw;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 1
    /*var(--radius)*/
  ;
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 1
    /*var(--radius)*/
  ;
}

.highlight pre::-webkit-scrollbar-track,
.highlight>div::-webkit-scrollbar-track,
pre code::-webkit-scrollbar-track {
  background: var(--code-bg) !important;
}

.highlight pre::-webkit-scrollbar-thumb,
.highlight>div::-webkit-scrollbar-thumb,
pre code::-webkit-scrollbar-thumb {
  background: var(--code-scroll-thumb) !important;
}

::-webkit-scrollbar-thumb:hover,
.highlight pre::-webkit-scrollbar-thumb:hover,
.highlight>div::-webkit-scrollbar-thumb:hover,
pre code::-webkit-scrollbar-thumb:hover {
  background: var(--link-color) !important;
}


/* 
 * BREADCRUMB 
 */

.breadcrumbs {
  margin: 0.5rem 0;
  opacity: 0.8;
  padding: 0;
}

.breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  margin: 0;
}

/* Remove any global li::before content for breadcrumbs */
.breadcrumbs li::before {
  content: none !important;
}

/* Add separators between breadcrumb items - but not for current page */
.breadcrumbs li:not(:first-child):not(.current)::before {
  content: "»";
  margin: 0 0.4rem;
  color: var(--tertiary-color);
  font-weight: bold;
}

.breadcrumbs a {
  color: var(--link-color);
  text-decoration: none;
  padding: 0.2rem 0.3rem;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  background: var(--code-bg);
  color: var(--link-color);
}

/* Current page in breadcrumb */
.breadcrumbs .current {
  font-weight: 600;
  color: var(--tertiary-color);
  background: var(--set-transparent);
  padding: 0.2rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Up arrow in breadcrumb current page */
.breadcrumb-up-arrow {
  color: var(--tertiary-color);
  font-weight: bold;
  font-size: 1em;
  margin-right: 0.2rem;
}

/* Make parent section (second-to-last item) more prominent */
.breadcrumbs li:nth-last-child(2) a {
  font-weight: 500;
  background: var(--secondary-color);
  color: var(--link-color);
}

.breadcrumbs li:nth-last-child(2) a:hover,
.breadcrumbs li:nth-last-child(2) a:focus {
  background: var(--tertiary-color);
  color: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 
 * MOBILE STYLES IMPORT 
 * Mobile-spezifische Styles werden am Ende geladen, um Desktop-Styles zu überschreiben
 * --> wird in css.html eingeladen. 
 */


/*
 * HTML 2 MD KONVERTER
 */
.converter-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.input-section,
.output-section {
  margin-bottom: 30px;
}

.textarea-container {
  position: relative;
  margin-bottom: 10px;
}

.input-textarea,
.output-textarea {
  width: 100%;
  min-height: 300px;
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.input-textarea:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 5px rgba(0, 124, 186, 0.3);
}

.output-textarea {
  background-color: #f8f9fa;
  border-color: #28a745;
}

.convert-button {
  background-color: #007cba;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-right: 10px;
}

.convert-button:hover {
  background-color: #005a87;
}

.clear-button {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-right: 10px;
}

.clear-button:hover {
  background-color: #545b62;
}

.markdown-copy-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  position: absolute;
  top: 10px;
  right: 10px;
}

.markdown-copy-btn:hover {
  background-color: #1e7e34;
}

.section-title {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.4em;
}

.char-count {
  font-size: 12px;
  color: #666;
  text-align: right;
  margin-top: 5px;
}

.status-message {
  padding: 10px;
  border-radius: 4px;
  margin-top: 10px;
  display: none;
}

.status-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* prevents markdown center everything in table issues we have */
table td {
  vertical-align: top;
}

/*
 * FLEXIBLE COLUMN LAYOUTS
 * Different column layouts for content pages
 */

/* Layout Container */
.layout-container {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

/* Default: 100% width (single column) */
.layout-100 .layout-main,
.layout-container:not([class*="layout-"]) .layout-main {
  width: 100%;
}

/* 70/30 Layout */
.layout-70-30 .layout-main {
  width: 70%;
}

.layout-70-30 .layout-sidebar {
  width: 30%;
}

/* 30/70 Layout */
.layout-30-70 .layout-main {
  width: 30%;
  order: 2;
  /* Move main content to the right */
}

.layout-30-70 .layout-sidebar {
  width: 70%;
  order: 1;
  /* Move sidebar to the left */
}

/* 60/40 Layout */
.layout-60-40 .layout-main {
  width: 60%;
}

.layout-60-40 .layout-sidebar {
  width: 40%;
}

/* 80/20 Layout */
.layout-80-20 .layout-main {
  width: 80%;
}

.layout-80-20 .layout-sidebar {
  width: 20%;
}

/* 40/60 Layout */
.layout-40-60 .layout-main {
  width: 40%;
  order: 2;
}

.layout-40-60 .layout-sidebar {
  width: 60%;
  order: 1;
}

/* 20/80 Layout */
.layout-20-80 .layout-main {
  width: 20%;
  order: 2;
}

.layout-20-80 .layout-sidebar {
  width: 80%;
  order: 1;
}

/* 50/50 Layout */
.layout-50-50 .layout-main {
  width: 50%;
}

.layout-50-50 .layout-sidebar {
  width: 50%;
}

/* Sidebar styling */
.layout-sidebar {
  background: var(--set-transparent);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--secondary-color-dark);
}

.layout-sidebar h2,
.layout-sidebar h3 {
  margin-top: 0;
  color: var(--tertiary-color);
}

.layout-sidebar ul {
  padding-left: 1.5rem;
}

/* Responsive Design: Stack columns on mobile */
@media (max-width: 800px) {
  .layout-container {
    flex-direction: column;
    gap: 1rem;
  }

  /* Reset all widths to 100% on mobile */
  .layout-70-30 .layout-main,
  .layout-70-30 .layout-sidebar,
  .layout-30-70 .layout-main,
  .layout-30-70 .layout-sidebar,
  .layout-60-40 .layout-main,
  .layout-60-40 .layout-sidebar,
  .layout-40-60 .layout-main,
  .layout-40-60 .layout-sidebar,
  .layout-80-20 .layout-main,
  .layout-80-20 .layout-sidebar,
  .layout-20-80 .layout-main,
  .layout-20-80 .layout-sidebar,
  .layout-50-50 .layout-main,
  .layout-50-50 .layout-sidebar {
    width: 100%;
  }

  /* Ensure correct order on mobile (main content always first) */
  .layout-30-70 .layout-main,
  .layout-40-60 .layout-main,
  .layout-20-80 .layout-main {
    order: 1;
  }

  .layout-30-70 .layout-sidebar,
  .layout-40-60 .layout-sidebar,
  .layout-20-80 .layout-sidebar {
    order: 2;
  }

  /* Reduce padding on mobile */
  .layout-sidebar {
    padding: 1rem;
  }

  /* Force sidebar to top on mobile if requested */
  .layout-container.mobile-sidebar-top .layout-sidebar {
    order: -1 !important;
  }

}