@font-face {
    font-family: 'U8';
    src: url('../fonts/U8-Hairline-web.woff') format('woff');
    font-weight: 100; /* Hairline */
    font-style: normal;
}
@font-face {
    src: url('../fonts/U8-HairlineItalic-web.woff') format('woff');
    font-weight: 100; /* Hairline Italic */
    font-style: italic;
}
@font-face {
    font-family: 'U8';
    src: url('../fonts/U8-Thin-web.woff') format('woff');
    font-weight: 200; /* Thin */
    font-style: normal;
}
@font-face {
    src: url('../fonts/U8-ThinItalic-web.woff') format('woff');
    font-weight: 200; /* Thin Italic */
    font-style: italic;
}
@font-face {
    font-family: 'U8';
    src: url('../fonts/U8-Light-web.woff') format('woff');
    font-weight: 300; /* Light */
    font-style: normal;
}
@font-face {
    src: url('../fonts/U8-LightItalic-web.woff') format('woff');
    font-weight: 300; /* Light Italic */
    font-style: italic;
}
@font-face {
    font-family: 'U8';
    src: url('../fonts/U8-Regular-web.woff') format('woff');
    font-weight: normal; /* Regular */
    font-style: normal;
}
@font-face {
    src: url('../fonts/U8-RegularItalic-web.woff') format('woff');
    font-weight: normal; /* Regular Italic */
    font-style: italic;
}
@font-face {
    font-family: 'U8';
    src: url('../fonts/U8-Medium-web.woff') format('woff');
    font-weight: 500; /* Medium */
    font-style: normal;
}
@font-face {
    src: url('../fonts/U8-MediumItalic-web.woff') format('woff');
    font-weight: 500; /* Medium Italic */
    font-style: italic;
}
@font-face {
    font-family: 'U8';
    src: url('../fonts/U8-Bold-web.woff') format('woff');
    font-weight: bold; /* Bold */
    font-style: normal;
}
@font-face {
    src: url('../fonts/U8-BoldItalic-web.woff') format('woff');
    font-weight: bold; /* Bold Italic */
    font-style: italic;
}
@font-face {
    font-family: 'U8';
    src: url('../fonts/U8-Black-web.woff') format('woff');
    font-weight: 900; /* Black */
    font-style: normal;
}
@font-face {
    src: url('../fonts/U8-BlackItalic-web.woff') format('woff');
    font-weight: 900; /* Black Italic */
    font-style: italic;
}

/* Globale Box-Sizing Regel */
html {
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

/* Globale Schriftart und Farben festlegen */
body {
    font-family: 'U8', sans-serif;
    background-color: #FFFFFF; /* Reines Weiß */
    color: #1A1A1A; /* Sehr dunkles Grau, fast Schwarz */
    line-height: 1.6;
}

a {
    color: #1A1A1A; /* Schwarzer Text für alle Links */
    text-decoration: none; /* Keine Unterstreichung standardmäßig */
    transition: text-decoration 0.3s ease;
}

a:hover {
    text-decoration: underline; /* Unterstreichung beim Hover */
}

h1, h2, h3, h4, h5 {
    font-family: 'U8', sans-serif;
    font-weight: bold;
    color: #1A1A1A; /* Schwarz für Überschriften */
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* Horizontale Navigation */
.navbar-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    /* padding-left: 15px;  Entfernt, wird global über body/html gesteuert */
    /* padding-right: 15px; Entfernt, wird global über body/html gesteuert */
}

.navbar {
    background-color: #FFFFFF !important; /* Weißer Hintergrund */
    border-bottom: none; /* Keine Border */
    padding: 10px 0; /* Mehr Padding oben/unten */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand img {
    max-height: 30px;
}

.navbar-nav {
    display: flex;
    flex-direction: row; /* Horizontale Anordnung */
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav .nav-item {
    margin-left: 15px; /* Abstand zwischen den Links */
}

.navbar-nav .nav-link {
    color: #1A1A1A; /* Schwarzer Text für Nav-Links */
    font-weight: normal; /* Regular Gewicht */
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.navbar-nav .nav-link:hover {
    text-decoration: underline; /* Unterstreichung beim Hover */
}

/* Buttons */
.btn {
    font-family: 'U8', sans-serif;
    font-weight: bold; /* Bold Gewicht für Buttons */
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 0; /* Keine abgerundeten Ecken */
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.btn-mondhuegel-primary {
    background-color: #1A1A1A; /* Schwarzer Hintergrund */
    border: 1px solid #1A1A1A;
    color: #FFFFFF; /* Weißer Text */
}

.btn-mondhuegel-primary:hover {
    background-color: #333333; /* Etwas helleres Schwarz beim Hover */
    border-color: #333333;
    color: #FFFFFF;
}

.btn-mondhuegel-secondary {
    background-color: transparent;
    border: 1px solid #1A1A1A; /* Dünner schwarzer Rahmen */
    color: #1A1A1A; /* Schwarzer Text */
}

.btn-mondhuegel-secondary:hover {
    background-color: #F5F5F5; /* Sehr helles Grau beim Hover */
    border-color: #1A1A1A;
    color: #1A1A1A;
}

/* Formulare */
.mondhuegel-form-group {
    margin-bottom: 1.5rem;
}

.mondhuegel-form-group label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

input.mondhuegel-input,
select.mondhuegel-input,
textarea.mondhuegel-input {
    background-color: #FFFFFF;
    border: 1px solid #F5F5F5; /* Dezenter hellgrauer Rahmen */
    color: #1A1A1A;
    padding: 10px;
    border-radius: 0; /* Keine abgerundeten Ecken */
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}
input.mondhuegel-input:focus,
select.mondhuegel-input:focus,
textarea.mondhuegel-input:focus {
    outline: none;
    border-color: #1A1A1A; /* Rahmen wird schwarz bei Fokus */
}

textarea.mondhuegel-input.richtext {
    min-height: 200px; /* Adjust as needed */
}

/* Tabellen */
.mondhuegel-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    color: #1A1A1A;
    background-color: #FFFFFF; /* Weißer Hintergrund */
}

.mondhuegel-table th,
.mondhuegel-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #F5F5F5; /* Feine, hellgraue Linien */
    text-align: left;
}

.mondhuegel-table thead th {
    background-color: #FFFFFF; /* Weißer Hintergrund */
    color: #1A1A1A; /* Schwarzer Text */
    font-weight: bold; /* U8 Bold */
    text-transform: none; /* Keine Großbuchstaben */
    border-bottom: 2px solid #1A1A1A; /* Etwas stärkere Linie unter Header */
}

.mondhuegel-table tbody tr:nth-child(even) {
    background-color: #F5F5F5; /* Optional: Leichter Grauton für jede zweite Zeile */
}

.mondhuegel-table tbody tr:hover {
    background-color: #e0e0e0; /* Ein deutlicheres Hellgrau beim Hover */
}

.mondhuegel-table th a,
.mondhuegel-table td a {
    color: #1A1A1A !important; /* Ensure links in tables are dark gray */
    text-decoration: none;
}

.mondhuegel-table th a:hover,
.mondhuegel-table td a:hover {
    text-decoration: underline;
}

.mondhuegel-table td strong {
    color: #1A1A1A !important; /* Ensure strong text in tables is dark gray */
}

/* Keine sichtbaren Boxen/Rahmen für Cards */
.mondhuegel-card {
    background-color: transparent; /* Transparent */
    border: none; /* Keine Border */
    border-radius: 0; /* Keine abgerundeten Ecken */
    padding: 0; /* Kein Padding, wird durch Inhalt gesteuert */
    margin-bottom: 30px; /* Mehr Abstand zwischen Sektionen */
}

.mondhuegel-card-body {
    padding: 0; /* Kein Padding */
}

/* Layout und Hilfsklassen */
.mondhuegel-container {
    width: 100%;
    max-width: 1400px;
    margin-right: auto;
    margin-left: auto;
    padding-top: 50px;
    padding-bottom: 50px;
}

.mondhuegel-mb-4 {
    margin-bottom: 2rem !important;
}

.mondhuegel-mb-3 {
    margin-bottom: 1.5rem !important;
}

.mondhuegel-mb-1 {
    margin-bottom: 0.5rem !important;
}

.mondhuegel-d-flex {
    display: flex !important;
}

.mondhuegel-w-100 {
    width: 100% !important;
}

.mondhuegel-justify-content-between {
    justify-content: space-between !important;
}

.mondhuegel-list-group {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #F5F5F5;
    border-radius: 0;
}

.mondhuegel-list-group-item {
    background-color: #FFFFFF;
    color: #1A1A1A;
    padding: 10px 15px;
    border-bottom: 1px solid #F5F5F5;
}

.mondhuegel-list-group-item:last-child {
    border-bottom: none;
}

.mondhuegel-list-group-item:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.mondhuegel-list-group-item:last-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.mondhuegel-list-group-item-action {
    text-decoration: none;
    color: #1A1A1A;
}

.mondhuegel-list-group-item-action:hover {
    background-color: #F5F5F5;
    color: #1A1A1A;
}

/* Alerts */
.alert {
    border-radius: 0;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #f5f5f5; /* Sehr helles Grau */
    color: #1A1A1A; /* Schwarzer Text */
    border: 1px solid #e3e3e3; /* Feiner, hellgrauer Rahmen */
    border-left: 5px solid #1A1A1A; /* Dicker, schwarzer Rand links als Akzent */
}

.alert-danger {
    background-color: #ffe6e6; /* Very light red */
    color: #1A1A1A;
    border-color: #e6a3a3;
}

/* Custom spacing for headings */
h1, h2, h3 {
    margin-bottom: 20px;
}

/* Spacing for report groups */
.report-gruppe {
    margin-bottom: 40px;
}

/* Overriding blue color for report content headings and table headers */
.mondhuegel-container h1,
.mondhuegel-container h2,
.mondhuegel-container h3 {
    color: #1A1A1A !important; /* Schwarz erzwingen */
    text-transform: uppercase;
    font-weight: bold;
}

.mondhuegel-container table thead th {
    background-color: #f5f5f5 !important; /* Hellgrauer Hintergrund */
    color: #1A1A1A !important; /* Schwarzer Text */
    font-weight: bold;
}

/* Pagination */
.pagination-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination {
    list-style: none;
    display: flex;
    gap: 5px;
    padding: 0;
}

.page-item a {
    color: #1A1A1A;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid #F5F5F5;
}

.page-item.active a {
    background-color: #F5F5F5;
    font-weight: bold;
}

.page-item.disabled a {
    color: #ccc;
    pointer-events: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: .25em .4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0; /* Minimalist: no rounded corners */
}

.badge-danger {
    color: #FFFFFF; /* White text */
    background-color: #1A1A1A; /* Dark background */
}

/* Small buttons */
.btn-small {
    padding: 5px 10px;
    font-size: 0.8em;
}

.btn-mondhuegel-danger {
    background-color: #e63946;
    border-color: #e63946;
    color: #FFFFFF;
}

.btn-mondhuegel-danger:hover {
    background-color: #c9303e;
    border-color: #c9303e;
    color: #FFFFFF;
}

/* Shopping List */
.recipe-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

/* Forms */
.mondhuegel-form {
    background-color: #F5F5F5;
    padding: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.full-width {
    grid-column: 1 / -1;
}

.ingredients-grid {
    display: grid;
    gap: 15px;
}

.ingredient-row {
    display: grid;
    grid-template-columns: 1fr; /* Eine Spalte auf mobilen Geräten */
    gap: 5px; /* Kleinerer Abstand */
}

.ingredient-row .btn {
    width: 100%; /* Button volle Breite */
    margin-top: 10px; /* Abstand zum oberen Feld */
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px; /* Hidden by default */
    width: 250px;
    height: 100%;
    background: #f8f9fa;
    padding: 20px;
    transition: left 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-brand {
    display: block;
    text-align: center;
    margin-bottom: 20px;
}

.sidebar-brand img {
    max-height: 40px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-item {
    margin-bottom: 10px;
}

.sidebar-nav .nav-link {
    display: block;
    padding: 10px 15px;
    color: #1A1A1A;
    text-decoration: none;
    border-radius: 5px;
}

.sidebar-nav .nav-link:hover {
    background-color: #e9ecef;
}

.main-content {
    margin-left: 0;
    transition: margin-left 0.3s ease-in-out;
    padding: 20px;
}

.main-content.active {
    margin-left: 250px;
}

.sidebar-toggler {
    position: fixed;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}



/* Mobile Navigation */
.navbar-toggler {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.toggler-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #1A1A1A;
    margin: 5px 0;
    transition: 0.4s;
}

.navbar-collapse {
    display: flex; /* Default to flex for desktop */
}

@media (max-width: 768px) {
    .navbar-collapse {
        display: block; /* Ändern zu block, um die Höhe zu steuern */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        position: absolute; /* Absolut positionieren, um den Fluss nicht zu stören */
        top: 60px; /* Unterhalb der Navbar */
        left: 0;
        width: 100%;
        background-color: #FFFFFF;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .navbar-collapse.active {
        max-height: 500px; /* Genug Höhe, um alle Links anzuzeigen */
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        text-align: left; /* Links ausrichten */
        background-color: #FFFFFF;
        position: static; /* Nicht absolut positionieren, da es jetzt Teil des navbar-collapse ist */
        padding: 20px 0;
        box-shadow: none; /* Schatten wird vom navbar-collapse gesteuert */
    }

    .navbar-nav.active {
        /* transform: translateX(0);  Nicht mehr benötigt */
    }

    .navbar-toggler {
        display: block; /* Show on mobile */
    }

    /* Hamburger animation */
    .navbar-toggler.active .toggler-icon:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .navbar-toggler.active .toggler-icon:nth-child(2) {
        opacity: 0;
    }

    .navbar-toggler.active .toggler-icon:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .mondhuegel-container {
        padding-left: 0; /* Kein zusätzliches Padding im Container */
        padding-right: 0; /* Kein zusätzliches Padding im Container */
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
    }

    .mondhuegel-d-flex.mondhuegel-justify-content-between.mondhuegel-mb-4 {
        flex-direction: column;
        align-items: flex-start;
    }

    .mondhuegel-d-flex.mondhuegel-justify-content-between.mondhuegel-mb-4 > div {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .mondhuegel-d-flex.mondhuegel-justify-content-between.mondhuegel-mb-4 > div .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .mondhuegel-card.mondhuegel-mb-4 .mondhuegel-d-flex {
        flex-direction: column;
    }

    .mondhuegel-card.mondhuegel-mb-4 .mondhuegel-d-flex .mondhuegel-input {
        margin-bottom: 10px;
    }

    .mondhuegel-card.mondhuegel-mb-4 .mondhuegel-d-flex button {
        margin-left: 0 !important; /* Override inline style */
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr; /* Eine Spalte auf mobilen Geräten */
    }

    .ingredients-grid .ingredient-row {
        display: grid;
        grid-template-columns: 1fr; /* Eine Spalte auf mobilen Geräten */
        gap: 5px; /* Kleinerer Abstand */
    }

    .ingredients-grid .ingredient-row .btn {
        width: 100%; /* Button volle Breite */
        margin-top: 10px; /* Abstand zum oberen Feld */
    }

    .login-container {
        max-width: 400px; /* Limit width for login form */
        margin: 50px auto; /* Center and add vertical spacing */
        padding: 30px; /* Internal padding */
    }

    .dashboard-grid {
        grid-template-columns: 1fr; /* Eine Spalte auf mobilen Geräten */
        gap: 20px; /* Kleinerer Abstand */
    }

    .error-page {
        text-align: center;
        padding: 20px;
    }

}

/* Globales Padding für den Body auf mobilen Geräten */
@media (max-width: 768px) {
    body {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Styles moved from recipe_form.html */
.form-label-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.8em;
}

.spinner {
    display: none;
    margin-left: 10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Global product image style */
.product-detail-image {
    max-width: 100%;
    height: auto;
    display: block; /* Removes additional space below the image */
    margin-bottom: 20px;
    border-radius: 0; /* No rounded corners */
}

.recipe-view-image {
    max-width: 300px; /* Smaller max-width */
    max-height: 300px; /* Smaller max-height */
    height: auto;
    display: block;
    margin: 0 auto 20px auto; /* Center the image and add bottom margin */
    border-radius: 0;
}

.recipe-form-image {
    max-width: 200px; /* Smaller max-width for recipe form image */
    max-height: 200px; /* Smaller max-height for recipe form image */
    height: auto;
    display: block;
    margin: 0 auto 10px auto; /* Center the image and add bottom margin */
    border-radius: 0;
    object-fit: contain; /* Ensure the whole image is visible */
}

.alchemy-card-image {
    max-width: 150px; /* Smaller max-width for alchemy cards */
    max-height: 150px; /* Smaller max-height for alchemy cards */
    height: auto;
    display: block;
    margin: 0 auto 10px auto; /* Center the image and add bottom margin */
    border-radius: 0;
    object-fit: contain; /* Ensure the whole image is visible */
}

.mondhuegel-hr {
    margin: 40px 0;
    border: none;
    border-top: 1px solid #F5F5F5;
}

.mondhuegel-mt-20 {
    margin-top: 20px !important;
}

/* Modal (for image zoom) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    padding-top: 60px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}



.product-description p {
    white-space: pre-wrap;
}

.read-more-btn:hover {
    color: #333333;
}

/* CSS-based truncation and expansion for product descriptions */
.product-description-container {
    max-height: 70px; /* Adjust as needed for desired short description height */
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.alchemy-card.expanded .product-description-container {
    max-height: 500px; /* Large enough to show full description */
}

.alchemy-product-description.full-description {
    display: block; /* Ensure it's always in the DOM for height calculation */
}

.alchemy-card-content {
    position: relative; /* Needed for absolute positioning of the arrow */
}

.alchemy-card-content::after {
    content: '▼'; /* Down arrow */
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 1em;
    color: #1A1A1A;
    transition: transform 0.3s ease;
}

.alchemy-card.expanded .alchemy-card-content::after {
    transform: rotate(180deg); /* Up arrow when expanded */
}


