/* @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap'); */

@font-face {
    font-family: 'Poppins';
    src: url('Poppins-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('Poppins-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('Poppins-ExtraLight-Italic.woff2') format('woff2');
    font-weight: 200;
    font-style: italic;
    font-display: swap;
}

:root {
    --background-color: #121212;
    --primary-color: rgb(244, 227, 120);
    --primary-color-inverted: #787EFF;
    --secondary-color: #333;
    --mainElementColor: #1E1E1E;
    --hover-color: #2c2c2c;
    --white: #E0E0E0;
    --text-detail-color: #AAAAAA;
    --price-color: #888888;
}

body.theme-light {
    --background-color: #EDEDED;
    --primary-color: rgb(0, 21, 186);
    --secondary-color: #CCCCCC;
    --mainElementColor: #E1E1E1;
    --hover-color: #D3D3D3;
    --white: #1F1F1F;
    --text-detail-color: #555555;
    --price-color: #777777;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--white);
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    margin: 20px auto;
    max-width: 1400px;
    /*min-height: 95vh;*/
    display: flex;
    flex-direction: column;

    overflow: hidden;
    position: relative;
    touch-action: pan-y; /* allow vertical scroll */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.header span {
    font-size: 1.2em;
}

/* Footer */
.footer {
    margin-top: 2em;
    left: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-size: 10px;
    font-weight: 100;
}

#footer {
    left: 0;
    bottom: 0;
}

#openinghours {
    text-align: left;
    font-size: 1em;
    color: #333;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.nav-button {
    background: var(--mainElementColor);
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.nav-button:hover {
    background: var(--hover-color);
}

.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;

    transition: transform 0.3s ease;
    will-change: transform;
}

.section {
    flex: 1;
    min-width: 300px;
    background: var(--mainElementColor);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
    max-width: 50vw;
}

.section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-top: 0px;
}

.dish {
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
    padding: 10px;
    border-radius: 8px;
    overflow: auto;
}

.dish:hover {
    background-color: var(--hover-color);
}

.dish:last-child {
    border-bottom: none;
}

.dish-title {
    font-weight: bold;
    color: var(--white);
}

.dish-details {
    color: var(--text-detail-color);
}

.dish-accordion {
    color: var(--text-detail-color);
    font-size: .75em;
    display: none;
    padding-top: 5px;
    padding-left: 5px;
}

.dish-allergens, .dish-counterinfo, .dish-additives, .nutrients-table {
    margin-top: 5px;
    text-align: left;
}

.dish-counter {
    color: var(--text-detail-color);
    font-size: .6em;
}

.bushou-accordion {
    color: var(--text-detail-color);
    font-size: .5em;
    display: none;
    padding-top: 5px;
    padding-left: 5px;
}

.price {
    float: right;
    color: var(--price-color);
}

.merkmal {
    color: var(--price-color);
}

.feature-text {
    font-weight: 200;
    font-style: italic;
}

.feature-icon,
.feature-icon-legend {
    width: 20px;
    height: 20px;
    margin-right: 5px; /* Add spacing between icons */
    vertical-align: middle; /* Align icons with text */
    filter: invert(50%);
}

.feature-icon {
    float: right;
}

.feature-icon-legend {
    margin-left: 8px;
    margin-right: 4px;
}

.feature-icon-legend {
    display: inline-flex;
    align-items: center;
    /* margin-right: 1em; */
    vertical-align: middle;
}

.feature-icon-legend img {
    width: 20px;
    height: 20px;
    margin-right: 0.4em;
}

.feature-icon-legend span {
    font-size: 0.9em;
    white-space: nowrap;
}

.dinner-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle; /* Align icons with text */
    filter: invert(100%) sepia(110%) saturate(500%) hue-rotate(20deg);
}

#dinnerButton {
    transition: background-color 0.3s, color 0.3s;
}
#dinnerButton.active {
    background-color: var(--primary-color-inverted)
}

.themeToggle {
    margin-top: 20px;
    font-size: 2em;
    border-radius: 50px; /* Make it round for better aesthetics */

    width: 50px; /* Set a fixed width */
    height: 50px; /* Set the same fixed height */
    display: inline-flex; /* Ensures the button content is centered */
    align-items: center; /* Vertical centering */
    justify-content: center; /* Horizontal centering */

    position: fixed; /* Positioning relative to the viewport */
    bottom: 10px; /* Distance from the bottom of the viewport */
    right: 10px; /* Distance from the left side of the viewport */

    z-index: 1000; /* Ensure it stays above other content */
    background-color: var(--secondary-color); /* Customize as needed */
    color: var(--white);
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease, opacity 0.5s ease; /* Transition properties */
}

.themeToggle.hidden {
    transform: translateY(100px);
    opacity: 0;
}

.popup {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.popup-content {
    flex: 1;
    min-width: 300px;
    max-width: 75%;
    max-height: 75%;
    background: var(--mainElementColor);
    padding: 1.5vw;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    border-collapse: collapse;
}

.close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

#openingtimes td:first-child{
    padding: 5px;
    white-space: normal;         /* Allow lines to wrap */
    word-wrap: break-word;       /* Break long words if needed */
    overflow-wrap: break-word;   /* Modern equivalent, better support */
    max-width: 7em;            /* Optional: limit width for wrapping */
}

#openingtimes tr:nth-child(even) {
    background-color: var(--hover-color);
}

#openPopup {
    margin: auto;
    margin-top: 5px;
    max-width: 50vw;
    align-items: center;
}

a {
    color: #64B5F6;
    text-decoration: none;
}
a:hover {
    ffont-weight: bold;
    text-decoration: underline;
}

a:visited {
    color: #508cbd;
    text-decoration: none;
}