/* Import Inter font family from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

/* Overall Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

/* Custom CSS Variables */
:root {
    --bg-main-color: white;
    --text-main-color: black;
    --footer-color: black;
    --custom-green: #5d9c69;
    --schedule-color: white;
    --bg-gradient-color: #87d3ec;
}

/* Body Styling */
body {
    background: linear-gradient(var(--bg-main-color) 0, var(--bg-main-color), var(--bg-gradient-color) 60rem);
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    overflow: scroll;
}

/* Start Navigation Bar Styling */
nav {
    position: fixed;
    top: 0;
    z-index: 100;
    display: flex;
    width: 100%;
    height: 5rem;
    justify-content: space-between;
    align-items: center;
    padding: 1rem calc((100vw - 1300px) / 2);
    box-shadow: 0 0 .3rem rgba(0, 0, 0, .2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    user-select: none;
}

/* TOM Text Styling */
.logo {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-main-color);
    text-decoration: none;
    transition: .2s ease;
    user-select: none;
}

.logo:hover {
    color: var(--custom-green); /* Title text turns green on hover */
}

/* Menu Styling */
.top-menu {
    position: relative;
    margin: 0 .3rem;
    padding: .6rem .9rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main-color);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.3s;
    user-select: none;
}

.top-menu:hover {
    background-color: rgba(220, 220, 220, 0.5);
}

.top-menu.active {
    background: var(--custom-green); /* Active green button */
    color: var(--bg-main-color); /* White text */
    transition: box-shadow .2s ease; 
}

.top-menu.active:hover {
    box-shadow: 0 0 .3rem var(--custom-green); /* Green box shadow on button of active page when active */
}

.icon {
    display: none; /* Keep icon hidden when wide screen */
    color: white;
    transition: 0.25s;
    background: var(--nav-bar-color);
}

.icon:hover {
    color: black;
    background: var(--nav-bar-color);
}
/* End Navigation Bar Styling */

/* Start Footer Styling */
footer {
    position: fixed;
    z-index: 100;
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding: .4rem 0 .6rem;
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--footer-color);
    color: var(--bg-main-color);
    user-select: none;
}

/* Footer Link Styling */
footer a {
    display: flex;
    margin-bottom: .2rem;
    width: 3rem;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--bg-main-color);
    text-decoration: none;
}

/* Footer Github Icon Styling */
footer .github {
    width: 3rem;
    height: 3rem;
    fill: var(--bg-main-color);
    transition: 0.1s;
}

footer .github:hover {
    fill: var(--custom-green);
}

footer p {
    font-size: 0.75rem;
    margin: 0;
    background-color: transparent;
}
/* End Footer Styling */

/* Start Schedule Styling */
.events-and-time-container {
    display: flex;
}

.events-and-time-container.hidden {
    opacity: 0; /* hidden class event containers are first added to */
}

.events-and-time-container.visible {
    opacity: 1; /* visible class for event containers when popped in*/
    transform: scale(1);
    animation: pop-in 0.5s ease-out;
}

.event-label-container {
    display: flex;
    flex-direction: row;
}

/* Left hidden */
.hidden-input {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(100%);
    transition: transform 1s, box-shadow .2s;
}

/* Left shown */
.show-input {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Right hidden */
.hidden-tom {
    opacity: 0;
    filter: blur(5px);
    transform: translateX(100%);
    transition: all 1s;
}

/* Right shown */
.show-tom {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
}

.form {
    display: flex; 
    justify-content: space-between;
    padding: 0 5rem;
    text-align: center;
    font-size: 1rem;
    color: var(--text-main-color);
}

.input-container {
    display: flex; 
    flex-direction: column; 
    margin: 9rem 1rem 2rem 5rem;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 0 .2rem rgba(0, 0, 0, .5);
    background: rgba(0, 0, 0, .1);
}

.input-container:hover {
    box-shadow: 0 0 .4rem rgba(0, 0, 0, .5);
}

.input-container p {
    margin: 1rem 0 0 .5rem;
    text-align: left;
    font-size: 1.3rem;
    font-weight: 600;
}

.input {
    display: flex;
    padding: 1rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: solid 1px rgba(0, 0, 0, 0.5);
    cursor: text;
    border-radius: 17px 0 0 17px;
    transition: 0.25s;
    text-decoration: none;
    align-items: center;
    width: 40rem;
    height: 2.5rem;
    background-color: #f7f7f7;
    border: 2px solid black;
    transition: 0.1s;
}

.input:hover {
    border: 2px solid var(--custom-green);
    transition: 0.1s;
}

.input-label {
    display: flex;
    justify-content: flex-start;
    text-align: left;
    font-size: 1.2rem; 
    font-weight: 500;
}

.input-label2 {
    display: flex;
    margin: 0 0 -1rem 15rem;
    justify-content: right;
    align-items: last baseline;
    font-size: 1rem;
    text-align: right;
}

.notes {
    display: flex;
    padding: 1rem;
    width: 40rem;
    height: 10rem;
    align-items: center;
    border-radius: 17px;
    border: solid 2px black;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    background: #f7f7f7;
    color: #000;
    cursor: text;
    transition: 0.1s ease-in-out;
}

.notes:hover {
    border: solid 2px var(--custom-green);
    transition: 0.1s ease-in-out;
}

textarea {
    resize: none;
}

.time-select {
    display: flex;
    align-items: center;
}

.input-select {
    padding-left: .5rem;
    cursor: pointer;
    transition: 0.1s ease-in-out;
    background-color:  black;
    border: black;
}

select option {
    background-color: white;
    color: black;
}

.input-select:hover {
    background-color: var(--custom-green);
    transition: 0.1s ease-in-out;
}

select {
    width: 8rem;
    height: 2.5rem;
    border-radius: 0 17px 17px 0;
    background-color: black;
    font-size: 1rem;
    font-weight: 500;
    color: white;
    overflow-y: auto;
    user-select: none;
}

option {
    font-size: 0.8rem;
    background-color: white;
}

#time {
    width: 3rem;
    height: 2.5rem;
    overflow-y: auto;
    font-size: 1rem;
}

.add-delete-container {
    display: flex;
    gap: 31.2rem;
}

.add-button {
    padding: .3rem 7.5rem .3rem 1.5rem;
    margin: -.5rem 0 2rem 0;
    width: 0.75rem; 
    height: 2.5rem;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    transition: 0.2s;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 0 .3rem var(--custom-green);
    background: var(--custom-green);
    color: white;
    --offset: 30px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.add-button:hover {
    box-shadow: 0 0 .3rem black;
    background: black;
    z-index: 1;
}

.clear-all-button {
    padding: .3rem 5.9rem .3rem 1.5rem;
    margin: -.5rem 0 2rem 0;
    width: 0.75rem; 
    height: 2.5rem;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    transition: 0.2s;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 0 .3rem var(--custom-green);
    background: var(--custom-green);
    color: white;
    position: relative;
}

.clear-all-button:hover {
    box-shadow: 0 0 .3rem #d71717;
    background-color: #d71717;
    z-index: 1;
}

.delete-button {
    width: 2.5rem; 
    height: 2.5rem;
    border: none;
    cursor: pointer;
    background: transparent;
    color: black;
    user-select: none;
    background-size: 1.5rem;
    background-repeat: no-repeat;
    background-position: center;
    justify-content: center;
    align-items: center;
    filter: invert(40%);
    transition: 0.25s;
}

.delete-button:hover {
   filter: invert(0%);
}

.submit-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: top;
    margin: 10rem 5rem 0 1rem;
    padding: 0;
    width: 15rem;
    text-align: center;
    user-select: none;
}

.submit-container p {
    margin: -1.5rem -.5rem 0 0;
    text-wrap: wrap;
    font-size: 1.3rem;
}

.schedule-button {
    padding: 1rem 3rem;
    font-weight: bold;
    border: none;
    background: rgba(255, 255, 255, 0);
    cursor: pointer;
    transition: 0.25s;
    text-decoration: none;
    align-items: center;
    width: 23rem;
    color: var(--bg-main-color);
}

#result {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 20rem 10rem 20rem;
    align-items: left;
}

#result h1 {
    margin-bottom: 1rem;
    padding: .8rem 0;
    width: 30rem;
    align-self: center;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 500;
    border-radius: 20px;
    border: solid 3px var(--custom-green);
    background: white;
    color: black;
    user-select: none;
    transition: .1s ease;
}

#result p {
    padding: .8rem;
    min-width: 30rem;
    border-top: solid 1.5px var(--custom-green);
    border-right: solid 3px var(--custom-green);
    border-bottom: solid 1.5px var(--custom-green);
    border-left: solid 3px var(--custom-green);
    font-weight: 400;
    font-size: 1.05rem;
    background-color: var(--schedule-color);
    color: black;
}

#result p:nth-of-type(1) {
    border-radius: 10px 10px 0 0;
    border-top: solid 3px var(--custom-green);
}

#result p:nth-last-of-type(1) {
    border-radius: 0 0 10px 10px;
    border-bottom: solid 3px var(--custom-green);
}

#result strong {
    background-color: var(--schedule-color);
    font-weight: 600;
    min-width: 30rem;
}

.schedule-button:hover {
    transform: scale(1.1);
}

#press-me-text {
    font-weight: 500;
}
/* End Schedule Styling */

/* Start Animation Styling */
.exit {
    filter: blur(5px);
    opacity: 0;
    transform: translateY(100%);
    transition: all 1s ease-in-out
}

@keyframes pop-in {
    from { opacity: 0; transform: scale(0.9); } /* trasition from hidden to visible */
    to { opacity: 1; transform: scale(1); } 
}

@keyframes rotate {
    from {
        transform: translate(-50%, -50%) scale(1.9) rotate(0turn);
    }

    to {
        transform: translate(-50%, -50%) scale(1.9) rotate(1turn);
    }
}

@media(prefers-reduced-motion) {
    .hidden {
        transition: none;
    }

    .hidden2 {
        transition: none;
    }
}
/* End Animation Styling */

/* Start Responsiveness Styling */
@media screen and (max-width: 768px) {
    .tom-container {
        grid-template-columns: 1fr;
    }
}

/* Collapsed menu visible once screen width under 1182px */
@media screen and (max-width: 1182px) { 
    nav {
        flex-direction: row;
        align-items: flex-start;
        background: var(--nav-bar-color);
    }

    .logo {
        margin: 0.75rem 0rem 0rem 1rem;
    }

    .top-menu {
        display: none; 
    }

    .icon {
        display: block;
        float: right;
        padding: 14px 16px;
        background: var(--nav-bar-color);
        border-radius: 50%;
        color: black;
    }

    .icon:hover {
        background: rgb(186, 186, 186);
    }

    .nav-items.responsive .top-menu {
        display: block;
        background-color: var(--bg-main-color);
        margin: 1rem;
    }

    .nav-items.responsive {
        position: relative;
        background-color: white;
        color: black;
        z-index: 1;
        border-radius: 15px;
        box-shadow: 0px 8px 16px rgba(28, 28, 28, 0.288);
        position: absolute;
        right: 0; 
        top: 60px; 
        width: auto;
        border: 2px solid var(--custom-green);
    }

    .nav-items.responsive a {
        float: none;
        color: black;
        padding: 12px 16px;
        text-decoration: none;
        display: block;
        text-align: left;
        background-color: var(--bg-main-color);
    }

    .nav-items.responsive a:hover {
        background-color: var(--custom-green);
        color: white;
    }

    .nav-items.responsive {
        display: block;
    }

    .form {
        padding: 0;
    }
}
/* End Responsiveness Styling */