/* Fonts */
@font-face {
    font-family: ChesterMain;
    src: url('../fonts/Cabin-VariableFont_wdth\,wght.ttf');
}
@font-face {
    font-family: ChesterAlt;
    src: url('../fonts/B612-Regular.ttf');
}
@font-face {
    font-family: Aviators-LED;
    src: url('../fonts/LEDCalculator.ttf');
}
@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/MaterialSymbolsOutlined.woff2') format('woff2');
    font-display: swap;
}
/* Global Styling */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: auto; /* prevent body from scrolling */
    font-family: ChesterMain, ChesterAlt, Arial, Helvetica, sans-serif;
    box-sizing: border-box;
    background: #081e41;
}
body {
    display: flex;
    flex-direction: column;
    overflow-x:hidden;
}
body.logging-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}
    .no-scroll {
        overflow: hidden;
        height:100%
    }
header {
    height: 12vh; /* fixed header height */
    flex-shrink: 0;
    width: 100%;
    position: relative;
}
    @media only screen and (min-width: 1080px) {    
        header {
            height:20vh;
        }
    }
main {
    position: relative;
    flex: 1 1 auto;  /* take remaining space */
    overflow: hidden; /* prevent main from scrolling itself */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* optional centering */
    align-items: flex-start;  /* top-align content */
    background: white;
}
footer {
    height: 0px; /* fixed footer height */
    flex-shrink: 0;
    width: 100%;
    position: relative;
}
button:focus {
    outline:none;
}
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 10vh;  /* Preferred icon size */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    user-select:none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
.blurred {
    filter: blur(10px);
    pointer-events: none; /* optional: prevent clicks on blurred elements */
    user-select: none;    /* optional: prevent text selection */
}
.overlay {
    position: absolute;
    top:0;
    left:0;
    width:100vw;
    height:100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index:50000;
    backdrop-filter: blur(10px);
    overflow:hidden;
}
    .overlay-heading {
        position: relative;
        font-size:6vw;
        background-color: #081e41;
        color:white;
        padding:1vh;
        border-bottom: thick ridge white;
        box-shadow: 10px 10px 10px #081e41;
        will-change: transform, opacity;
        transform:scale(1,0);
        opacity:1;
        transition: transform 0.5s ease, opacity 0.5s ease;
    }
        @media only screen and (min-width: 1080px) {
            .overlay-heading {
                font-size:6vh;
            }
        }
    .overlay-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: #081e41;
        height: 50vh;
        width:85%;
        padding: 1% 2.5% 1% 2.5%;
        border-radius:10px;
    }
    .overlay-text {
        display: flex;
        justify-content: center;
        align-items: center;
        color:white;
        font-size:3vw;
        text-align: center;
    }
    .overlay-close {
        position: absolute;
        top:2vh;
        right:2vw;
        color:white;
        border: medium solid #081e41;
        border-radius:100%;
        background: #081e41;
        cursor: pointer;
        font-size:10vw;
    }
        @media only screen and (min-width: 1080px) {
            .overlay-close {
                font-size:8vh;
            }
        }
    .overlay-form {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: start;
        align-items: center;
        width:95%;
        max-height: 95%;
        background-color: #1750ad;
        box-shadow: 10px 10px 10px #081e41;
        color:white;
    }
        .overlay-fieldset {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-evenly;
            width:75%;
            border:medium solid #081e41;
            box-shadow: 5px 5px 2.5px #081e41;
            margin: 1vh 0 1vh 0;
            transition: height 0.5s ease, opacity 0.3s ease;
        }
            .overlay-button-container {
                flex-direction: row;
            }
            .overlay-legend {
                display: flex;
                flex-direction: column;
                font-size:4vw;
                opacity: 1;
                transition: opacity 0.3s ease;
            }        
                @media only screen and (min-width: 1080px) {
                    .overlay-legend {
                        font-size:5vh;
                    }
                }
            .overlay-fieldset-inner {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                width:90%;
            }
        .overlay-option,
        .overlay-select {
            font-size:2vh;
        }
        .overlay-input {
            width:75%;
            font-size:5vw;
            color:#081e41;
        }
            @media only screen and (min-width: 1080px) {
                .overlay-input{
                    font-size:6vh;
                }
            }
        .overlay-button {
            font-size:5vw;
            border-radius:15px;
            cursor: pointer;
            transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.5s ease, border 0.5s ease;    
            border:none;        
            padding:1.5vw;
        }
            @media only screen and (min-width: 1080px) {
                .overlay-button {
                    font-size:6vh;
                    padding:1vh;
                }
            }
            .overlay-button.selected {
                color:white;
                background: #081e41;
                border: ridge medium #ffffff;
            }
        .overlay-date-input {
            position: relative;
            top:0;
            flex: 0 0 auto;                /* don’t let flexbox stretch it */
            width:98%;
            min-width: 0;                  /* override browser min width */
            outline: none;
            background: #081e41;
            font-size: 3.5vw;
            color: white;
            border: none;
            padding: 0 0 0 2.5%;
            border: medium solid transparent;
            border-radius:0;
            box-sizing: border-box;
            text-align: center;
            cursor: pointer;
        }
            @media only screen and (min-width: 1080px) {
                .overlay-date-input{
                    font-size:7vh;
                }
            }
        .overlay-btn-container {
            display: flex;
            flex-direction: row;
            justify-content: space-evenly;
            align-items: center;
            width:50%;
            margin: 2vh 0 2vh 0;
        }

.message {
    position: relative;
    width:100%;
    align-content: center;
    height:6vh;
    font-size:2vh;
    text-align: center;
    background: green;
    color: white;
    margin:1vh 0 1vh 0;
    transition: height 0.5s ease, margin 0.5s ease;
}
    @media only screen and (min-width: 1080px) {    
        .message {
            font-size:2vw;
            height:10vh;
        }
    }

* {
    scrollbar-width: thin;                      /* auto | thin | none */
    scrollbar-color: #1750ad #ffffff;           /* thumb | track */
}

/* Chrome, Edge, Safari */
*::-webkit-scrollbar {
    width: 8px;                                 /* scrollbar width */
    height: 8px;                                /* for horizontal scroll */
}

*::-webkit-scrollbar-track {
    background: #ffffff;                        /* track color */
}

*::-webkit-scrollbar-thumb {
    background-color: #1750ad;                  /* thumb color */
    border-radius: 10px;                        /* rounded corners */
    border: 2px solid #ffffff;                  /* creates gap around thumb */
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #0f3b80;                  /* darker on hover */
}
/*Login Overlay*/
.login-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width:100%;
    height:100%;
    margin: 0 0 0 0;
    will-change: opacity;
    transition: opacity 0.5s ease;
}
    #loginOverlay .overlay-heading {
        font-size:5vh;
    }
    @media only screen and (min-width: 1080px) {
        #loginOverlay .overlay-heading {
            font-size:3.5vw;
        }
    }
    .login-message {
        display: none;      
        flex-direction: row;
        align-items: center;
        justify-content: center;         /* hide by default */
        transform: scale(0, 1);        /* collapse vertically */
        will-change: transform, opacity;
        transition: transform 0.5s ease, opacity 0.5s ease;
        opacity: 0;                  /* fade in/out smoothly */
        position: absolute;          /* overlay on top */
        top: 0;
        width:100%;
        transform-origin: center;
        background-color: #f8d7da;   /* optional: red-ish background for message */
        color: #721c24;              /* optional: text color */
        padding: 0.5vh;
        border-radius: 5px;
        z-index: 9999;
        height: fit-content;
        text-align: center;
        font-size:3vh;
        font-weight: bold;
    }
        .login-message.error {
            background-color: red;
            color:white;
        }

    .user-container {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        margin-top:5vh;
        row-gap: 4vh;
        align-items: center;
        justify-content: space-evenly;
        width:100%;
    }
        .new-row {
            flex-basis:100%;
        }
        .user {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            will-change: transform, opacity;
            transform: scale(0);
            opacity:1;
            transition: transform 0.5s ease, opacity 0.5s ease;
            transform-origin: center;
            user-select: none;

        }
            .user-letter {
                display: flex;
                align-items: center;
                justify-content: center;
                font-size:10vh;
                width:12vh;
                height:12vh;
                background-color:#1750ad;
                color:white;
                border-radius:50%;
                cursor:pointer;
                text-align: center;
            }
                @media only screen and (min-width: 1080px) {    
                    .user-letter {
                        font-size:8vw;
                        width:10vw;
                        height:10vw;
                    }
                }
            .user-name {
                font-size:5vh;
            }
            @media only screen and (min-width: 1080px) {    
                .user-name {
                    font-size:3vw;
                }
            }
#changeUser,
#forgotPin {
    position: fixed;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    top:0;
    font-size:2vh;
    text-align: center;
    cursor: pointer;
    background-color: #081e41;
    border: medium solid white;
    box-sizing: border-box;
    color: white;
    padding:2%;
    z-index:1000;
    transform: scale(0,1);
    transform-origin: left;
    transition: transform 0.5s ease;
    will-change: transform;
}
#changeUser {
    left:0;
}
#forgotPin {
    right:0;
}
    @media only screen and (min-width: 1080px) {
        #changeUser,
        #forgotPin {
            font-size: 2vw;
            padding:1%;
        }
    }
    #changeUser span {
        font-size:3vh;
    }
        @media only screen and (min-width: 1080px) {
            #changeUser span {
                font-size: 3vw;
            }
        }
.pin-container {
    display: flex;
    position: absolute;
    left:0;
    top: 30vh;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    width:100%;
    height:70vh;
    margin: 0 0 1vh 0;
    opacity:0;
    will-change: opacity;
    transition: opacity 0.5s ease;
}
@media only screen and (min-width: 1080px) {
    .pin-container {
        top:35vh;
        height: 65vh;
    }
}
    .pin-display {
        position: relative;
        display: flex;     
        flex-direction: row;       /* flex container for centering */
        justify-content: space-evenly;  /* horizontal center */
        align-items: center;      /* vertical center */
        width:90%;
        height:20%;
        user-select: none;
    }
    @media only screen and (min-width: 1080px) {
        .pin-display {
            width:50%;
        }
    }
        .pin-dot {
            width:4vw;
            aspect-ratio: 1 / 1;
            border: medium solid #081e41;
            border-radius: 100%;
            user-select: none;
        }
        @media only screen and (min-width: 1080px) {
            .pin-dot {
                width:2vw;
            }
        }
            .pin-dot.filled {
                background:#081e41;
            }
    .pin-btn-container {
        position: relative;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        width: 100%;
        height:60%;
        font-size:6vh;
        margin-top:2vh;
        row-gap:1vh;
    }
    @media only screen and (min-width: 1080px) {    
        .pin-btn-container {
            width:50%;
        }
    }
    .pin-btn-container > :last-child {
        grid-column: 2;
    }
        .pin-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            flex: 0 0 calc(33.333% - 2vh);
            max-width:18vh;
            position: relative;
            aspect-ratio: 1 / 1;
            border: medium solid #081e41;
            background-color: rgba(8, 30, 65, 0.5);
            color:#081e41;
            border-radius:100%;
            font-size:5vh;
            cursor: pointer;
            text-align: center;
            user-select: none;
        }
        @media only screen and (min-width: 1080px) {    
            .pin-btn {
                max-width: 25vw;
            }
        }

#pinError {
    position: fixed;
    bottom:0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    will-change: height;
    height:0;
    transition: height 0.5s ease;
    background: red;
    width:100vw;
    overflow:hidden;
}

/* Top bar */
.top-bar {
    position: absolute;
    top:0;
    left:0;
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    flex-grow: 0;
    width:100%;
    height:13vh;
    background: #081e41;
    color:white;
    border-bottom: medium solid #1750ad;
    box-sizing: border-box;
}
@media only screen and (min-width: 1080px) {    
    .top-bar {
        height:20vh;
        padding:0.5% 0 1% 0;
    }
}
    .top-bar-left {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-start; /* left align */
        height:100%;
        width:20%;
        cursor: pointer;
    }        
        .top-bar-left .material-symbols-outlined {
            font-size:6vh;
        }    
        @media only screen and (min-width: 1080px) {    
            .top-bar-left .material-symbols-outlined {
                font-size:6vw;
            }
        }    
        .menu-btn {
            display: inline-block;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }
        .menu-btn.open {
            transform: rotate(90deg); /* or 180deg */
        }

    .top-bar-centre {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width:80%;
        height:80%;
        font-size:4vh;
    }
    @media only screen and (min-width: 1080px) {
        .top-bar-centre {
            justify-content: center;
            height:100%;
            font-size:4vw;
        }
    }
    #sessionCountdown {
        position: absolute;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        text-align: right;
        transform: scale(0, 1);
        transform-origin: right;
        will-change: transform;
        width: 20vw;
        height:2.5vh;
        bottom: 0;
        bottom:0;
        transition: transform 0.5s ease;
        font-size:1vh;
        overflow:hidden;
    }
    @media only screen and (min-width: 1080px) {
        #sessionCountdown {
            font-size:1vw;
            width:15vw;
            height:2vw;
            bottom:-1vw;
        }
    }
    .top-bar-right {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width:20%;
        height:100%;
    }
        .top-bar-user {
            position: relative;
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: end;
            align-self: end;
            min-width:30%;
            height:100%;
            margin:0 5% 0 0;
            font-size:2vh;
            text-decoration: none;
            cursor: pointer;
        }            
        @media only screen and (min-width: 1080px) {
            .top-bar-user {
                font-size:2vw;
            }
        }
            .top-bar-user h3 {
                padding:0 0.5% 0;
                margin:0;
                border-top:medium solid white;
            }
        .user-mgmt {
            width:6vh;
            border-radius:100%;
            aspect-ratio: 1 / 1;
            cursor: pointer;
        }
        @media only screen and (min-width: 1080px) {
            .user-mgmt {
                width:6vw;
            }
        }
    .user-menu {
        position: absolute;
        z-index: 6000;
        width:50vw;
        max-height:80vh;
        font-size:4vh;
        background: white;
        color:#1750ad;
        border: thick solid white;
        box-sizing: border-box;
        transform: scaleY(0);
        transform-origin: top left;   /* animate from the top edge downwards */
        transition: transform 0.4s ease;
        overflow-y: auto;
    }
    @media only screen and (min-width: 1080px) {
        .user-menu {
            width:25vw;
        }
    }
        .user-menu-cont {
            position: relative;
            display: flex;
            flex-direction: column;
            flex-wrap: 1;
            gap:1vh;
            width:100%;
            min-height:fit-content;
            background-color: #081e41;
            color:white;
            box-sizing: border-box;
        }
        .user-option {
            background-color: #081e41;
            border-bottom:thin solid white;
            font-size:3vh;
            padding: 0 1vw 0 1vw;
            cursor: pointer;
        }
        @media only screen and (min-width: 1080px) {
            .user-option {
                font-size:3vw;
            }
        }


/* Menus dropdowns */
.global-menu {
    position: absolute;
    top:75%;
    left:0;
    z-index: 6000;
    width:75vw;
    max-height:80vh;
    font-size:4vh;
    background: white;
    color:#1750ad;
    border: thick solid white;
    box-sizing: border-box;
    transform: scaleY(0);
    transform-origin: top left;   /* animate from the top edge downwards */
    transition: transform 0.4s ease;
    overflow-y: auto;
}
    @media only screen and (min-width: 1080px) {
        .global-menu {
            width:50vw;
            font-size:2vw;
        }
    }
    .global-app-cont {
        position: relative;
        display: flex;
        flex-direction: column;
        flex-wrap: 1;
        gap:1vh;
        width:100%;
        min-height:fit-content;
        background-color: #081e41;
        color:white;
        box-sizing: border-box;
    }
        .global-app-icon-cont {
            position: relative;
            display: flex;
            flex-direction: row;
            justify-content: start;
            align-content: center;
            min-height:100%;
            border-bottom:thin solid #1750ad;
        }
            .global-app-icon {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                margin-right:2vw;
                z-index:2000;
            }
            .global-app-name {
                display: flex;
                align-items: center;
            }
    .app-menu-bar {
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-evenly;
        width:100%;
        padding:1%;
        z-index:1000;
        background-color: #1750ad;
        color:white;
    }
        @media only screen and (min-width: 1080px) {    
            .app-menu-bar {
                padding:0.5%;
            }
        }
        .app-menu-option {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            width:15%;
            height:100%;
            font-size:2vh;
            background: #1750ad;
            color: white;
            border:medium solid #1750ad;
            border-radius: 10px;
            box-sizing: border-box;
            padding:1%;
            cursor:pointer;
            text-align: center;
        }
                @media only screen and (min-width: 1080px) {    
                   .app-menu-option {
                        padding:0.5%;
                        font-size:2vw;
                    }
                }
    .selected {
        border: medium solid #081e41;
        background: #081e41;
        color: white;
    }
/* App Tiles */
.app-tile-container {
    display: flex;
    flex-wrap: wrap;            /* allow items to wrap into rows */
    justify-content: center;    /* center items horizontally */
    gap: 1vw;                   /* space between tiles */
    width: 98vw;
    margin: auto;
    padding: 2vh 0 5vh 0;
    box-sizing: border-box;
    overflow-y:auto;
}
.app-tile-container > * {
    flex: 0 1 calc(50% - 1vw);  /* 2 columns, accounting for the gap */
    max-width: calc(50% - 1vw);
}
@media only screen and (min-width: 1080px) {
    .app-tile-container {
        padding: 1vw 0 1vw 0;
    }

    .app-tile-container > * {
        flex: 0 1 calc(33.333% - 1vw);  /* 3 columns */
        max-width: calc(33.333% - 1vw);
    }
}
    .app-tile {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        width: 95%;
        aspect-ratio: 1 / 0.75;      /* Fill the grid cell */
        box-sizing: border-box;
        box-shadow: 10px 10px 10px #1750ad;
    }
        @media only screen and (min-width: 1080px) {
            .app-tile {
                aspect-ratio: 1 / 0.5; /* 2 columns of equal width */
            }    
        }
        .app-name {
            font-size:3vh;
        }


/* Meal planning */
/* List view */
.plan-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    flex: 1 1 auto;
    gap:1.5vh;
    margin: auto;
    margin-bottom:2vh;
    padding-top:2vh;
    width:100%;
    height:100%;
    overflow-y: auto;
    overflow-x:hidden;
    transition: opacity 0.5s ease;
}
.meal-row {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    flex-shrink: 0;
    width:90%;
    min-height:15vh;
    transition: transform 0.3s ease, filter 0.3s ease;
    background: #1750ad;
    will-change: transform, opacity;
}
    @media only screen and (min-width: 1080px) {
        .meal-row {
            height:auto;
        }
    }
    .meal-row.selected {
        transform: scale(1.1);
        transition: transform 0.3s ease;
    }
        .meal-row.selected .meal-content-meal,
        .meal-row.selected .meal-content-adult, 
        .meal-row.selected .meal-content-child {
            border: thick solid #081e41;
            transition: border 0.3s ease;
        }
        .meal-row.selected .meal-day-input {
            border: thick solid #081e41;
            color:#081e41;
            background: white;
            transition: background-color 0.3s ease, color 0.3s ease;
        }
    .meal-row.not-selected {
        transform:scale(0.5);
        filter:blur(10px);
        transition: transform 0.3s ease, filter 0.3s ease;
        cursor: default;
        user-select: none;
    }
        .meal-row.not-selected .edit,
        .meal-row.not-selected .swap,
        .meal-row.not-selected .delete,
        .meal-row.not-selected input {
            cursor: default;
            user-select: none;
            pointer-events: none;  /* Prevent clicks/typing entirely */
        }

            .meal-row.selected .meal-content-meal:focus,
            .meal-row.selected .meal-content-adult:focus,
            .meal-row.selected .meal-content-child:focus {
                background: #081e41;
                color:white;
                font-weight: bolder;
            }

    .meal-day-fieldset {
        position: relative;
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        justify-content: start;
        align-items: center;
        border:none;
        width:100%;
        height:100%;
        padding:0 0 0 0;
    }
        .meal-day-input {
            position: relative;
            top:0;
            flex: 0 0 auto;                /* don’t let flexbox stretch it */
            width:100%;
            min-width: 0;                  /* override browser min width */
            outline: none;
            background: #081e41;
            font-size: 4.5vw;
            color: white;
            border: none;
            padding: 0 0 0 2.5%;
            border: medium solid transparent;
            border-radius:0;
            margin: 0 0 2vh 0;
            box-sizing: border-box;
        }
            @media only screen and (min-width: 1080px) {
                .meal-day-input {
                    font-size:3vw;
                }
            }
    .meal-text-container {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width:90%;
        margin: 0 0 1% 0;
    }
        .meal-content-meal,
        .meal-content-adult,
        .meal-content-child {
            position: relative;
            font-size:2vh;
            border:none;
            width:100%;
            height: fit-content;
            text-align: center;
            border-radius:15px;
            border: thick solid #1750ad;
            box-sizing: border-box;
            margin:0;
        }
        @media only screen and (min-width: 1080px) {
            .meal-content-meal,
            .meal-content-adult,
            .meal-content-child {
                font-size:3vw;
            }
        }
            .meal-content-meal:focus,
            .meal-content-adult:focus,
            .meal-content-child:focus {
                outline:none;
            }
            .meal-fieldset-adult,
            .meal-fieldset-child {
                position: relative;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                width:95%;
                height:fit-content;
                background: #1750ad;
                border:none;
                border-top: medium solid white;
                color:white;
                padding:0;
                margin:0;
            }
        .meal-legend-adult,
        .meal-legend-child {
            font-size:2vh;
            margin-left:2vw;
        }
        @media only screen and (min-width: 1080px) {
            .meal-legend-adult,
            .meal-legend-child {
                font-size:3vw;
            }
        }
        .meal-content-adult,
        .meal-content-child {
            max-height:fit-content;
        }
    .eating-seperate-edit {
        position: absolute;
        top:0;
        right:0;
        display: flex;                 /* hidden by default */
        flex-direction: column;
        overflow: hidden;
        max-width: fit-content;              /* hide inner content while collapsing */
        max-height: 100%;
        background: #081e41;
        color:white;
        font-size:1.5vh;
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.3s ease-in;
        z-index:1000;
    }
        @media only screen and (min-width: 1080px) {
            .eating-seperate-edit {
                font-size:2vw;
            }
        }
        .eating-seperate-edit.open {
            display: flex;
            transform: scaleX(1);
        }
        .eating-seperate-edit fieldset {
            border:none;
            text-align: center;
        }
        .eating-seperate-edit select {
            width:auto;
            font-size: 1.5vh;
        }
            @media only screen and (min-width: 1080px) {
                .eating-seperate-edit select {
                    font-size:2vw;
                }
            }
    .meal-actions {
        position: relative;
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        align-items: center;
        color:white;
        width:100%;
        margin:1vh 0 1vh 0;
    }
        .edit,
        .swap,
        .delete {
            width:fit-content;
            text-align: center;
            cursor: pointer;
            box-sizing: border-box;
            font-size:4vh;
            border-radius:100%;
            opacity:1;
            will-change: transform, background-color, opacity;
            transition: transform 0.5s ease, color 0.5s ease, background-color 0.5s ease, color 0.5s ease, opacity 0.5s ease;
        }
            @media only screen and (min-width: 1080px) {
                .edit,
                .swap,
                .delete {
                    font-size:4vw;
                };
            }

    .editing {
        background-color: #1750ad;
        color:white;
        backdrop-filter: blur(100px);
        transition: background-color 0.5s ease;
    }
    .blur-overlay {
        position: fixed;
        inset: 0;
        background-color: rgba(255,255,255, 0.9);
        z-index: 2000;
    }
        .ui-dialog {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            z-index: 5000 !important;
            background: #1750ad !important;
            border: none !important;
            border-radius: 10px;
            padding-bottom:2.5vh !important;
            color: white !important;
        }
            .ui-dialog-content {
                background: white !important;
                text-align: center;
                width:90% !important;
            }
            .ui-dialog-titlebar {
                position: relative;
                background: none !important;
                border: none !important;
                border-radius: 0px !important;
                color: white !important;
                margin-bottom:0.5vh;
                width:100%;
            }
                .ui-dialog-title {
                    border-bottom: medium solid white !important;
                    width:100% !important;
                    font-size:2.5vh;
                }
                .meal-delete-dialog .ui-dialog-titlebar-close {
                    display: none;
                }
            .ui-dialog-buttonpane {
                background: none !important;
                border: none !important;
                color: white !important;
            }
                .ui-button {
                    background: white !important;
                    color: #1750ad !important;
                }
            .close-hidden {
                display:none !important;
            }
/* Calendar View */
.plan-calendar {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin:1vh auto 1vh auto;
    width:100%;
    height:100%;
    overflow-y: auto;
    overflow-x:hidden;
    opacity:0;
    transition: opacity 0.5s ease;
}    
    .meal-plan-calendar {
        width:95%;
    }
    .calendar-container {
        position: relative;
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        width:100%;
        height: fit-content;
        background-color: white;            
    }
    .calendar-day-title-row {
        position: relative;
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        width:100%;
        height:4vh;
        background-color: #081e41;
        color: white;
        font-weight:bold;
    }
        .calendar-day-title,
        .calendar-day {
            position: relative;
            width:calc(100%/7);
            text-align: center;
            box-sizing: border-box;
            border: 0.15vw solid #081e41;
            box-sizing: border-box;
        }
        .calendar-day-title:first-of-type {
            border-left:0.15vw solid #081e41;
        }
        .calendar-day-title {
            border-left:thin solid white;
            height:100%;
        }
    .calendar-row {
        position: relative;
        display: flex;
        flex: 1 1 auto;
        flex-direction: row;
        justify-content: space-evenly;
        box-sizing: border-box;
        width:100%;
    }
        .calendar-day {
            display: flex;
            flex-direction: column;
            justify-content: center;
            flex: 1 1 auto;
            height:25vw;
            position: relative;
            cursor: pointer;
        }
            @media only screen and (min-width: 1080px) {
                .calendar-day {
                    height:10vw;
                };
            }
            .calendar-day-month {
                position:absolute;
                bottom:0.5vh;
                left:0.5vh;
                font-size:1.75vh;
            }
            .calendar-day-date {
                position:absolute;
                right:0.5vh;
                bottom:-0.5vh;
                font-size:1vh;
                height:20%;
            }
                @media only screen and (min-width: 1080px) {
                    .calendar-day-date {
                        font-size:1vw;
                        bottom:0.5vh;
                    };
                }
            .calendar-meal {
                position: absolute;
                top:0.25vh;
                display: flex;
                flex-direction: column;
                justify-content: space-evenly;
                align-items: center;
                width:100%;
                height:75%;
                font-size:1.4vh;
            }
                .calendar-meal u {
                    min-width:100%;
                    text-align: left;
                    text-decoration: none;
                    border-bottom: thin solid #1750ad;
                }
                .calendar-meal p {
                    margin:0;
                }
                @media only screen and (min-width: 1080px) {
                    .calendar-meal {
                        font-size:1.5vw;
                    };
                }
            .today {
                background: #1750ad;
                color:white;
            }
            .greyed {
                background: lightgrey;
            }
    .edit-menu-container {
        position: relative;
        display: none;
        flex-direction: row;
        justify-content: space-evenly;
        align-items: center;
        width:100%;
        height:5vw;
        margin: 2vh 0 0 0;
        opacity: 0;
        will-change: opacity;
        transition: opacity 0.5s ease;
        transform-origin: center;
        box-sizing: border-box;
        z-index:2000;
    }        
        @media only screen and (min-width: 1080px) {
            .edit-menu-container {
                height:6vh;
            };
        }
        .edit-menu-option {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            height:100%;
            font-size:4vw;
            background-color: #081e41;
            color: white;
            border:medium solid #081e41;
            border-radius: 10px;
            box-sizing: border-box;
            padding:3%;
            cursor:pointer;
        }        
        @media only screen and (min-width: 1080px) {
        .edit-menu-option {
                font-size:3vh;
                padding:1.5%;
            };
        }  
            .edit-menu-option span {
                font-size:3vh;
            }
           @media only screen and (min-width: 1080px) {
                .edit-menu-option span {
                    font-size:3vw;
                };
            }
                .option-disabled {
                    background-color: darkgray;
                    border: medium solid darkgray;
                    color:lightgray;
                    cursor:default;
                    transition: background-color 0.5s ease, color 0.5s ease;
                }
/* Datepicker */
.datepicker {
    position: relative;
    width:inherit;
}
.ui-datepicker-header,
.ui-datepicker-calendar {
    font-family: ChesterMain, ChesterAlt, Arial, Helvetica, sans-serif;
}
.ui-state-highlight {
    background:none !important;
}
.ui-state-active {
    background:#1750ad !important;
    color:white !important;
}

.meal-date a,
.meal-date-add a {
    position: relative; /* For the triangle */
    border: 2px solid red !important; /* Thin red border */
    padding: 4px; /* Adjust padding to prevent content overlap */
}
    .meal-date a::after,
    .meal-date-add a::after {
        content: ""; /* Add a pseudo-element for the corner triangle */
        position: absolute;
        bottom: -1px !important;
        left: 0;
        width: 0;
        height: 0;
        border-left: 12px solid transparent; /* Adjust the size of the triangle */
        border-top: 10px solid red; /* Red triangle */
        transform: rotate(180deg);
    }

/* Shopping list */
.shopping-list {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    justify-content: center;
    width: 75%;
    height:fit-content;
}
    .shopping-list-item {
        width: 50%;               /* your desired overall width */
        display: flex;            /* aligns children horizontally */
        align-items: center;      /* vertical alignment of checkbox and text */
        gap: 0.5rem;              /* space between checkbox and text */
        padding: 0.25rem 0;       /* optional spacing */
        box-sizing: border-box;   /* ensures padding doesn’t break width */
    }   
        .shopping-list-item .material-symbols-outlined {
            font-size: 3.5rem;
        }
        .shopping-list-item-name {
            flex: 1;
            text-align: left;
            font-size: 2vw;
        }
/* Cleaning */
.cleaning-list {
    position: relative;
    display: flex;
    flex-direction: column;
    row-gap:0.5vh;
    width:100%;
    min-height:100%;
    overflow-y: auto;
    background-color: #1750ad;
    padding-top:1vh;
}
    .cleaning-task {
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width:100%;
        height:7.5vh;
        color:#081e41;
        padding: 0.5vh 1vw 0.5vh 1vw;
        box-sizing: border-box;
    }
        .task-name {
            font-size: 2.5vh;
            width:50%;
        }
        @media only screen and (min-width: 1080px) {
            .task-name {
                font-size:2vw;
            };
        }
        .task-freq {
            font-size: 3vh;
            cursor:pointer;
            width: 10%;
        }           
        @media only screen and (min-width: 1080px) {
            .task-freq {
                width: 35%;
                font-size: 2vw;
            };
        }
            .task-info {
                position: absolute;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: space-between;
                row-gap: 0.5vh;
                min-width: 20%;
                background: #081e41;
                color: #081e41;
                padding: 0.25rem 0.25rem 0.25rem 0.25rem;
                font-size: 2vh;
                z-index: 1000;
                border-radius: 4px;
            }
            @media only screen and (min-width: 1080px) {
                .task-info {
                    font-size:1.5vw;
                };
            }
                .task-info div {
                    background: white;
                    width:100%;
                    border-radius: 4px;
                }
        .task-due {
            font-size:1.75vh;
            width:25%;
            text-align: right;
        }
        @media only screen and (min-width: 1080px) {
            .task-due {
                font-size: 2vw;
                width:15%;
            };
        }
        .ok {
            background: white;
        }
        .due-soon {
            background: orange;
        }
        .overdue {
            background: red;
            color:white;
        }
/*Animations*/
.rotate {
    animation: rotate infinite 2s;
    background-color: white;
    color:#1750ad;
    transition: background-color 0.5s ease, color 0.5s ease;
}
@keyframes rotate {
    0% {
        rotate: 0deg ;
    }
    100% {
        rotate: 360deg;
    }
}
