:root {
    --primary: #ff6b00;
    --primary-dark: #cc5500;
    --accent: #ffc04d;
    --bg-light: #fffaf5;
    --text: #222;
    --text-light: #fff;
    --border-radius: 6px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --font: 'Segoe UI', sans-serif;

    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
}

body {
    margin-top: 90px;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text);
    font-family: var(--font);
}

.nav-item {
    position: relative;
}

.has-submenu .submenu {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    list-style: none;
    margin: 0;
    gap: 1rem;
    flex-direction: column;
    z-index: 100;
    border: white double 10px;
    transition: none;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transition: none; /* sofort sichtbar */
}

.has-submenu:not(:hover) .submenu {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease 0.2s,
    visibility 0.1s linear 0.35s;
}

/* Beim Wechsel (hover auf anderes Icon): vorheriges Submenü schließt SOFORT */
.navbar.submenu-switch .has-submenu:not(:hover) .submenu {
  transition: none !important;
}

/* Icon gelb, solange sein Submenü sichtbar ist (Hover auf li oder Fokus innerhalb) */
.has-submenu:hover > a .nav-icon,
.has-submenu:focus-within > a .nav-icon {
  filter: brightness(0) saturate(100%) invert(86%) sepia(82%) saturate(5000%) hue-rotate(1deg);
}


.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
    z-index: 999;
}

.submenu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: var(--border-radius);
}

.submenu li a:hover {
    background-color: var(--primary-dark);
}

/* Submenü: Icon wird gelb, wenn die GANZE Zeile (Link) oder der Text gehovt/fokussiert ist */
.submenu li a:hover .nav-icon,
.submenu li a:focus .nav-icon,
.submenu li a:focus-visible .nav-icon {
  filter: brightness(0) saturate(100%) invert(86%) sepia(82%) saturate(5000%) hue-rotate(1deg);
}

.submenu .submenu-text {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}


.submenu .nav-icon {
    width: 32px;
    height: 32px;
}

/* Navbar */
.navbar {
    background-color: var(--primary);
    padding: 10px;
    box-shadow: var(--shadow);
    position: fixed;            /* <- macht die Navbar fixiert */
    top: 0;                     /* oben am Viewport */
    left: 0;
    right: 0;
    z-index: 9999;
    height: 50px;
}


.nav-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    vertical-align: middle;
}

.nav-icon:hover {
  filter: brightness(0) saturate(100%) invert(86%) sepia(82%) saturate(5000%) hue-rotate(1deg);
}


.nav-links {
    position: fixed;
    left: 50vw;
    transform: translateX(-50%);
    top: 0;
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.nav-divider {
    width: 5px;
    height: 48px;
    background-color: #fff;
    margin: 0 0.5rem;
    border-radius: 10px;
}


/* Diagramm-Layout */
.chart-row {
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
    margin: 40px auto;
    width: 100%;
}

.chart-half {
    flex: 1 1 45%;
    max-width: 750px;
}

.chart-half canvas {
    width: 100%;
    height: 300px !important;
}

.chart-half-finance {
    flex: 1 1 45%;
    max-width: 750px;
}

.chart-half-finance canvas {
    width: 100%;
    height: 600px !important;
}

.chart-half-finance-pie canvas {
    width: 100%;
    height: 500px !important;
}


.chart-third {
    flex: 1 1 28%;
    max-width: 450px;
}

.chart-third canvas {
    width: 100%;
    height: 300px !important;
}


.chart-quarter {
    flex: 1 1 20%;
    max-width: 333px;
}

.chart-quarter canvas {
    width: 100%;
    height: 300px !important;
}



/* Überschriften */
.ueberschrift {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text);
}

/* Optional: Standardbutton */
button {
    background-color: var(--primary);
    color: var(--text-light);
    border: none;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    box-shadow: var(--shadow);
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: var(--primary-dark);
}

input, select, textarea {
    font-family: var(--font);
    font-size: 1em;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    width: 100%;
    box-sizing: border-box;
}


.container {
    max-width: 600px;
    margin: 60px auto;
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-block {
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 15px;
}

/* Slider */

.zeitbereich-container {
    position: fixed;
    top: 30px;         /* ggf. an Navbar-Höhe anpassen */
    right: 20px;       /* oder: left: 50%; transform: translateX(-50%); für zentriert */
    margin: 0;
    z-index: 10000;
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 350px;
}

.zeitbereich-form {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-family: var(--font);
}

.zeitbereich-label {
    font-weight: bold;
    font-size: 1rem;
    color: var(--text);
}

.zeitbereich-slider {
    width: 100%;
    height: 8px;
    border-radius: var(--border-radius);
    background: var(--accent);
    box-shadow: var(--shadow);
    outline: none;
    transition: background 0.3s;
}

.zeitbereich-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
    border: 2px solid white;
    transition: background 0.2s;
}

.zeitbereich-slider::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
}

.zeitbereich-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
    border: 2px solid white;
    transition: background 0.2s;
}

.zeitbereich-slider::-moz-range-thumb:hover {
    background: var(--primary-dark);
}

.zeitbereich-toggle {
    display: inline-flex;
    align-items: center;
    margin-top: 0.5rem;  /* Abstand zum Zeitraum-Label */
    gap: 0.35rem;
    white-space: nowrap;
    font-weight: bold;
    font-size: 1rem;
}

.food-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: var(--font);
    background-color: white;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.food-table th,
.food-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.food-table th {
    background-color: var(--accent);
    color: var(--text);
    font-weight: bold;
}

.food-table tr:hover {
    background-color: #fff2e5;
}

.food-table td form {
    display: inline;
}


.autocomplete-list {
    list-style: none;
    margin-top: -341px;
    padding: 0;
    background-color: white;
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow);
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
}

.autocomplete-list-tr {
    list-style: none;
    margin-top: -180px;
    padding: 0;
    background-color: white;
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow);
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 1em;
}

.autocomplete-item:hover {
    background-color: var(--accent);
}



/* Pizza */
.input-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
}

.kalorien-output {
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-dark);
    margin-top: 20px;
}



/*biz*/

.kategorie-select {
    padding: 6px;
    border-radius: var(--border-radius);
    border: 1px solid #ccc;
    background-color: white;
    font-family: var(--font);
    font-size: 0.95rem;
}

.modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 500px;
    max-width: 90%;
    position: relative;
    z-index: 1001;
}

.modal select {
    background-color: white;
    color: var(--text);
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: var(--font);
    font-size: 1rem;
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
    appearance: auto;
}

.close-button {
    position: absolute;
    right: 16px;
    top: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.input-group-dropdown {
    flex: 1 1 30%;
    display: flex;
    flex-direction: column;
}

.censor .value,
.censor canvas {
  filter: blur(7px);
  transition: filter .18s ease-in-out;
}
.censor:hover .value,
.censor:hover canvas {
  filter: none;
}





/* === Additions for FIJI.css === */

.content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.toolbar {
  position: sticky;
  top: 70px; /* unter Navbar (50px + etwas Abstand) */
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin: 0 0 16px 0;
}

.search-input {
  width: 340px;
  max-width: 60vw;
  padding: 10px 12px;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
}

.badge {
  display: inline-block;
  background: var(--primary-dark);
  color: var(--text-light);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.food-card {
  text-align: center;
  background: white;
  border: 1px solid #eee;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  cursor: pointer;
}

.food-card:hover {
  background: #fff7ee;
  border-color: var(--accent);
}

.card-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}

.title-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  justify-content: center;  /* horizontal mittig */
  text-align: center;
}

.pill {
  background: var(--primary);
  color: var(--text-light);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  /*! font-size: 0.9rem; */
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: center;  /* horizontal mittig */
  gap: 10px;
  flex-wrap: wrap;
  color: #444;
  font-size: 0.95rem;
  margin-bottom: 6px;
  margin-top: 6px;
}

.nutri {
  background: #fafafa;
  border: 1px solid #eee;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 1em;
  min-width: 90px;
  text-align: center;
}

.subtle {
  font-size: 0.85rem;
  color: #777;
}

.loadmore-wrap {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.loadmore-btn {
  background: var(--accent);
  color: var(--text);
}

.status-msg {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  background: white;
  padding: 10px 14px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-left: 6px solid var(--primary);
  font-weight: 600;
}

.status-msg.is-ok { border-left-color: var(--success); }
.status-msg.is-err { border-left-color: var(--error); }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.btn-secondary {
  background: #eee;
  color: #333;
}



/* Lernkarten – Fragen (neue Klassen) */

.frage-bild-thumb {
    max-width: 80px;
    max-height: 80px;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.frage-bild-preview {
    max-width: 140px;
    max-height: 140px;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    object-fit: contain;
    box-shadow: var(--shadow);
    background-color: #fafafa;
}

#bildPreviewWrapper {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 6px;
    background-color: #fffdf8;
}

.antwort-row {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 8px 10px;
    margin-top: 6px;
    background-color: #fffaf5;
}

.antwort-row-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.antwort-row-main input[type="text"] {
    flex: 1;
}

.antwort-korrekt-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-size: 0.9rem;
}

.antwort-row-meta {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.antwort-row-meta input[type="text"] {
    flex: 1;
}

.antwort-remove-btn {
    padding: 6px 10px;
    font-size: 0.9rem;
}

/* Sci-Lernkarten: zusätzliche Styles */

.content-wrap-sci {
    max-width: 1000px;
}

/* Modal über Navbar + scrollbarer Inhalt */
.modal.modal-sci {
    z-index: 10000;
}

.modal-content-sci {
    width: 900px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
}

/* Filterleiste kompakter */
.fragen-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

/* Checkbox/Radio nicht full-width */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin: 0 4px 0 0;
}

/* Inline Checkbox oben rechts im Modal */
.input-group-inline-checkbox {
    flex: 0 0 auto;
    align-self: flex-end;
    padding-bottom: 4px;
}

.inline-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Fragebild in Karten + Modal */
.frage-bild-thumb {
    max-width: 80px;
    max-height: 80px;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.frage-bild-preview {
    max-width: 140px;
    max-height: 140px;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    object-fit: contain;
    box-shadow: var(--shadow);
    background-color: #fafafa;
}

#bildPreviewWrapper {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 6px;
    background-color: #fffdf8;
}

/* Antwortoptionen-Container */
#antwortOptionenContainer {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Einzelne Antwort */
.antwort-row {
    border-radius: var(--border-radius);
    padding: 10px 12px;
    background-color: #fffaf5;
    box-shadow: var(--shadow);
}

.antwort-row-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.antwort-row-main input[type="text"] {
    flex: 1;
}

.antwort-korrekt-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-size: 0.9rem;
}

.antwort-row-meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.antwort-row-meta input[type="text"] {
    flex: 1;
}

.antwort-remove-btn {
    padding: 6px 10px;
    font-size: 0.9rem;
}

/* Bild als Antwort */
.antwort-row-bild {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.antwort-bild-upload {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.antwort-bild-preview-wrapper {
    width: 80px;
    min-height: 60px;
    border-radius: var(--border-radius);
    border: 1px dashed #ddd;
    background-color: #fffdf8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.antwort-bild-preview {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
    display: block;
}
