* {
    transition: ease 0.3s;
}

:root {
    --background-color: #202020;
    --secondary-background-color: #2b2b2b;
    --tertiary-background-color: #373737;
    --border-color: #1d1d1d;
    --secondary-border-color: #3a3a3a;
    --text-color: #cccccc;
    --highlight-color: #00659f;
    --button-color: #687172;
}

body.light-mode {
    --background-color: #f3f3f3;
    --secondary-background-color: #fbfbfb;
    --tertiary-background-color: #fefefe;
    --border-color: #e5e5e5;
    --secondary-border-color: #ececec;
    --text-color: #687172;
    --highlight-color: #00659f;
    --button-color: #687172;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;

    overflow: hidden;
}


.main_panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 70%;
    width: 30%;
    margin: auto;
    background: var(--secondary-background-color);
    outline: solid 0.2vh var(--border-color);

    border-radius: 2vh;

    align-items: start;
    justify-content: start;
}

.title_bar {
    width: 93%;
    height: 10%;
    padding: 2.5%;
    margin: 1%;
    margin-top: 1.1%;
    background: var(--tertiary-background-color);
    outline: solid 0.2vh var(--secondary-border-color);
    border-radius: 1.5vh;

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4vh;
    font-weight: bold;
    letter-spacing: 0.5vh;

    text-transform: uppercase;
}

.invisible_form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 90%;
    width: 100%;

    background-color: none;
    border-radius: 2vh;

    padding: 0;
    margin: 0;
}

.input_section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    min-width: 75%;
    margin-top: 5%;

    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;

    background: none;
    padding: 0;
    margin: 0;
}

input {
    width: 100%;
    height: 7.5%;
    padding: 1%;
    margin-bottom: 5%;

    background: var(--tertiary-background-color);
    color: var(--text-color);
    border: none;
    border-radius: 1vh;
    padding-left: 2%;

    font-size: 2vh;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.2vh;

    color-scheme: dark;

    border: solid 0.2vh var(--secondary-border-color);

    &:hover {
        border-bottom: 0.2vh solid var(--highlight-color);
        transform: scale(1.01);
    }
    &:active {
        letter-spacing: 0.2vw;
        border: 0.2vh solid var(--highlight-color);
    }

    &:focus {
        letter-spacing: 0.2vw;
        border: 0.2vh solid var(--highlight-color);
        outline: none;
    }
}

input[type="time"]::-webkit-calendar-picker-indicator {
    background: var(--tertiary-background-color);
    border-radius: 1vh;
    border: 0.1vh solid var(--secondary-border-color);
    cursor: pointer;

    padding-right: 1%;

    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;

    -webkit-mask-image: url('clock.svg');
    mask-image: url('clock.svg');

    background-color: var(--text-color);
}

input[type="time"]::-webkit-calendar-picker-indicator:hover {
    border: 0.1vh solid var(--highlight-color);
    background-color: var(--highlight-color);
}

label {
    font-size: 1vh;
    font-weight: bold;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.2vh;
    margin-bottom: 1%;

    &:hover {
        color: var(--highlight-color);
    }
}

.calculate_button {
    width: 50%;
    height: 10%;
    margin-bottom: 5%;
    border-radius: 5vh;
    font-size: 2vh;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.2vh;
    transition: all 0.3s ease;
}

.invisible_form:invalid .calculate_button {
    background: var(--button-color);
    border: 0.2vh solid var(--button-color);
    cursor: not-allowed;
    pointer-events: none;
}

.invisible_form:valid .calculate_button {
    background: var(--highlight-color);
    border: 0.2vh solid var(--highlight-color);
    cursor: pointer;
    pointer-events: auto;

    &:hover {
        border: solid 0.2vh var(--button-color);
        transform: scale(1.025);
        letter-spacing: 0.3vh;
    }

    &:active {
        border: solid 0.2vh var(--button-color);
        transform: scale(0.99);
        letter-spacing: 0.2vh;
    }
}

.modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(0.25vh);
    z-index: 1000;

    color: var(--text-color);
    
    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal_overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal_box {
    background: var(--tertiary-background-color);
    width: 20vw;
    padding: 2.5vh;
    border-radius: 2vh;
    color: var(--text-color);
    outline: 0.2vh solid var(--secondary-border-color);
    text-align: center;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.light-mode .modal_overlay {
    background: rgba(251, 251, 251, 0.6);
}

.modal_overlay.active .modal_box {
    transform: scale(1);
}

.modal_title {
    font-size: 3vh;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3vh;
}

.modal_results {
    font-size: 2.2vh;
    color: var(--text-color);
    line-height: 1.6;
}

.close_btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--text-color);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close_btn:hover {
    color: #ff6b6b;
}

.highlight-time {
    color: var(--highlight-color);
    font-weight: bold;
}

#home-button {
    position: absolute;
    top: 1vh;
    left: 1vh;
    display: flex;
    flex-grow: 1;
    padding: 1vh;
    max-height: 3vh;
    max-width: 3vh;
    border-radius: 1vh;
    border: none;
    background: #687172;
    outline: 0.1vh solid #687172;
    color: white;
    margin: 0;

    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;

    &:hover {
        cursor: pointer;
        transform: scale(1.1);
        outline: 0.175vh solid var(--highlight-color);
    }

    &:active {
        cursor: pointer;
        transform: scale(1.05);
        outline: 0.175vh solid var(--highlight-color);
    }

    &:focus {
        transform: scale(1.1);
        outline: 0.175vh solid var(--highlight-color);
    }
}

.invalid-limit {
    text-decoration: line-through;
    color: #ff6b6b !important;
    opacity: 0.7;
}

.warning-text {
    font-size: 1.2vh;
    color: #ff6b6b;
    text-transform: uppercase;
    letter-spacing: 0.1vh;
    margin-top: 0.2vh;
}

#modeToggle {
    position: absolute;
    top: 1vh;
    right: 1vh;
    display: flex;
    flex-grow: 1;
    padding: 2.25vh;
    max-height: 3vh;
    max-width: 3vh;
    border-radius: 1vh;
    border: none;
    background: #687172;
    outline: 0.1vh solid #687172;
    color: white;
    margin: 0;

    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;

    &:hover {
        cursor: pointer;
        transform: scale(1.1);
        outline: 0.175vh solid var(--highlight-color);
    }

    &:active {
        cursor: pointer;
        transform: scale(1.05);
        outline: 0.175vh solid var(--highlight-color);
    }

    &:focus {
        transform: scale(1.1);
        outline: 0.175vh solid var(--highlight-color);
    }
}