@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Outfit:wght@100..900&family=Quicksand:wght@300..700&display=swap');

:root {
    --dawn: #826189;
    --dawn2: #A7A0E0;
    --water: #126AA1;
    --water2: #205B96;
    --earth: #206E2D;
    --earth2: #289620;
    --sunset: #EB2B28;

    --quicksand: 'Quicksand', sans-serif;
    --inter: 'Inter', sans-serif;
    --outfit: 'Outfit', sans-serif;

    --current-primary: var(--dawn);
    --current-secondary: var(--dawn2);
}

button, input, select, option, textarea {
    font-family: inherit;
}

html {
    min-height: 100%;
}

body{
    min-height: 100vh;
    font-family: var(--quicksand);

    background-color: var(--current-primary);
    background-image: url("../img/Dawn.svg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;

    color: var(--current-primary);
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: auto; 
}

/* Nav Bar */
header {
    display: flex;
    justify-content: left;
    align-items: center;

    text-align: right;
    height: 50px;
    margin: 8px;
}

header h3 {
    padding: 0 30px;
    color: var(--current-primary);
    z-index: 1000;
}

nav ul{
    font-size: 16px;

    list-style: none;
    display: flex;
    flex-direction: row;

    gap:30px;
}

nav a{
    color: var(--current-primary);
    text-decoration: none;
    font-weight: 600;

    padding: 5px 10px;
    border-radius: 12px;
    transition: all 0.2s ease-out;
}

nav a:hover{
    background-color: var(--current-secondary);
    color: white;
}

#hamburger {
    display: none;
}

@media (max-width: 630px) {
    nav {
        position: absolute;
        flex-direction: column;
        align-items: center;
        top: 0px;
        left: 0;
        width: 100%;
        height: 0;

        text-align: center;
        background: white;
        transition: 0.5s;
        overflow: hidden;

        z-index: 999;
    }

    nav ul {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 50px;
        padding: 0;
    }

    nav li:nth-child(1) {
        margin-top: 100px;
    }

    nav a{
        padding: 10px 100px;
    }

    label {
        margin-left: auto;
        width: 45px;
        height:30px;
        cursor: pointer;
        position: relative;
        z-index: 1000;
    }

    label div {
        width: 100%;
        height: 5px;
        background: var(--current-primary);
        position: absolute;
        transform: translateY(-50%);
        border-radius: 99px;
        transition: 0.3s;
        transform: scale(1);
    }

    label div:nth-child(1) {
        top: 0;
    }
    label div:nth-child(2) {
        top: 50%;
    }
    label div:nth-child(3) {
        top: 100%;
    }

    input:checked + header nav {
        height: 100vh;
    }
    input:checked + header label div:nth-child(1) {
        transform: rotate(45deg);
        top:50%;
    }
    input:checked + header label div:nth-child(3) {
        transform: rotate(-45deg);
        top:50%;
    }
    input:checked + header label div:nth-child(2) {
        transform: scale(0);
        opacity: 0;
    }
}




/*
-------------
Standard View
-------------
*/

h1{
    font-size: 55px;
    text-align: center;
}

.calendar {
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    width: 100%;
    border: transparent;
    border-radius: 12px;
    max-width: 80vw;
    margin: 20px auto;
    box-sizing: border-box;
    padding: 16px 50px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

/* Calendar Header */
.header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    position: relative;
}

.month-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.month {
    font-size: 50px;
    font-weight: 800;
    color: var(--current-primary);
    padding: 15px 50px 20px;
}

#prev-btn, #next-btn {
    display: block;
    border-radius: 50%;
    border-color: transparent;

    color: white;
    background-color: var(--current-secondary);
    position: relative;
    top: 50%;
    cursor: pointer;
}


#add-session {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);

    display: flex;
    justify-content: center;
    align-items: center;

    width: 35px;
    height: 35px;
    border-radius: 50%;

    background-color: var(--current-secondary);
    color: white;
    font-size: 24px;
    line-height: 0;
    border: none;

    cursor: pointer;
    padding-bottom: 2px;
}


/* Calendar Grid */
.weekdays, .days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.weekdays {
    margin-bottom: 25px;
    font-size: clamp(10px, 2.5vw, 16px);
    font-weight: 600;
}

.weekday {
    background-color: var(--current-secondary);
    padding: 6px 4px;
    color: white;
    border-radius: 10px;
    white-space: nowrap;
    min-width: 0;
    box-sizing: border-box;
}

.weekdays, .weekday {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    font-size: 30px;
    font-weight: 450;
    border-radius: 12px;
    padding: 10px 4px 50px;
    min-height: 80px;
    border: 1px solid var(--current-secondary);
    box-sizing: border-box;
}

.weekday {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.date {
    overflow: visible;
}

.days-inactive,
.date-inactive {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0.6;
    min-height: 80px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#calendar-body .days {
    min-height: 400px;
}

/* Session Modal */
#sessions, #overlay {
    display: none;
}

.sessions {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    background-image: url("../img/Dawn.svg");
    background-position: center;
    background-size: cover;
    
    color: var(--current-primary);
    padding: 20px 0;
    border-radius: 12px;
    z-index: 100;
    width: 300px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

.sessions h3 {
    font-size: 25px;
    margin: 10px;
    padding-bottom: 10px;
}

#sessions.open {
    display: block;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* Form Elements */
.sessions form {
    width: 80%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sessions label {
    color: var(--current-primary);
    font-weight: 600;
    margin-bottom: 5px;
}

.sessions input,
.sessions textarea {
    width: 100%;
    padding: 4px;
    border-radius: 6px;
    border: 1px solid var(--current-secondary);
    background-color: white;
    font-size: 14px;
    box-sizing: border-box;
}

.sessions input[type="submit"] {
    background-color: var(--current-secondary);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s ease-out;
}

#notes {
    height: 100px;
}

/* Event Styles */
.event-tag {
    background-color: var(--current-secondary);
    color: white;
    margin-top: 5px;
    padding: 2px 4px;
    font-size: 12px;
    border-radius: 4px;
}

.newSession {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    background-image: url(../img/Sunset.svg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    border-radius: 10px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 200;
}

#cancel-btn {
    background-color: var(--current-secondary);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}



/* Media Queries */

@media (max-width: 800px) {
    .calendar {
        height: auto;
    }
    .date {
        padding-bottom: 30px;
    }
}

@media (max-width: 680px) {
    .month {
        font-size: 40px;
        padding: 15px 20px;
    }
}


@media (max-width: 550px) {
    .calendar {
        width: 95%;
        margin: 10px auto;
        padding: 10px;
        box-sizing: border-box;
        max-width: 100vw; 
    }
    
    .month {
        font-size: 25px;
    }

    .date {
        padding-bottom: 20px;
    }
}