/* root variables */
:root{
    --main-font: "Lexend", sans-serif;
    --large-font: 8rem;
    --medium-font: 5rem;
    --small-font: 3rem;
    --main-color: hsl(220, 12%, 15%);
    --secondary-color: hsl(210, 11%, 96%);
    --tertiary-color: rgb(162, 162, 162);
    --highlight-color: hsl(0, 0%, 85%);
}

/* Themes */
.dark-mode{
    --main-color: hsl(210, 11%, 96%);
    --secondary-color: hsl(220, 12%, 15%);
    --highlight-color: #555555;

}

.academic-theme{
    --main-color: #543a2c;
    --secondary-color: #faeac3;
    --highlight-color: #ceb578;
    --tertiary-color: #e1d1a7;
}

.bi{
    fill: var(--main-color);
    cursor: pointer;
}


*{
    font-family: var(--main-font);
    color: var(--main-color);
}

body {
    min-height: 100vh;
    max-height: 100vh;
    color: var(--main-color);
    display: flex;
    flex-direction: column;
    margin: 0em;
    background-color: var(--secondary-color);
}

form{
    display: flex;
    flex-direction: column;
}

a, a:visited{
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    text-decoration: none;
    color: var(--main-color);
}

a:hover{
    font-weight: 600;
    color: rgb(95, 95, 95);
    text-decoration: underline;
}



/*Navigation Bar*/

.nav{
    display: flex;
    min-height: 4em;
    min-width: 100%;
    justify-items: center;
    align-items: center;
    border-bottom: 0.15em solid var(--main-color);
}

#nav-links{
    display: flex;
    flex-direction: row;
    gap: 8vw;
    justify-content: center;
    margin-right: auto;
    transition: 
        gap 0.3s cubic-bezier(.46,0,.55,1), 
        opacity 0.2s cubic-bezier(.46,0,.55,1);
    opacity: 1;
    pointer-events: auto;
}

#nav-links.collapsed {
    gap: 4vw;
    opacity: 0;
    pointer-events: none;
}

#nav-sandwich {
    background: none;
    border: none;
    padding: 0;
    margin-left: 3vw;
    margin-right: auto;
}

#nav-sandwich svg{
    width: 3em;
    height: 3em;
}

@media(max-width: 1024px){
    .nav{
        display: flex;
        min-height: 4em;
        min-width: 100%;
        justify-items: center;
        align-items: center;
        border-bottom: 0.15em solid var(--main-color);
    }

    #nav-links{
        display: flex;
        flex-direction: row;
        justify-content: center;
        margin-right: auto;
        gap: 5vw;
        transition:  
            gap 0.3s cubic-bezier(.46,0,.55,1), 
            opacity 0.2s cubic-bezier(.46,0,.55,1);
        opacity: 1;
        pointer-events: auto;
    }

    #nav-links.collapsed {
        gap: 2vw;
        opacity: 0;
        pointer-events: none;
    }

    #nav-sandwich{
        width: 3em;
        height: 3em;
        margin-left: 3vw;
        margin-right: auto;
    }
}

@media(max-width: 690px){
    .nav{
        display: flex;
        flex-direction: column;
        position: relative;
        min-height: 4em;
        min-width: 100%;
        justify-items: center;
        align-items: center;
        border-bottom: 0.15em solid var(--main-color);
    }

    #nav-links.expanded {
        position: fixed;
        inset: 25px 0px 0px 0px;
        display: flex;
        flex-direction: column;
        background-color: var(--secondary-color);
        max-height: 90%;
        min-width: 100%;
        justify-self: center;
        justify-content: center;
        margin: auto auto auto auto;
        z-index: 1;
        gap: 5vw;
        transition:  
            gap 0.3s cubic-bezier(.46,0,.55,1), 
            opacity 0.2s cubic-bezier(.46,0,.55,1);
        opacity: 1;
        pointer-events: auto;
    }

    #nav-links{
        display: none;
        gap: 2vw;
        opacity: 0;
        pointer-events: none;
    }

    #nav-sandwich{
        width: 3em;
        height: 3em;
        margin-left: 3vw;
        margin-right: auto;
        margin-top: auto;
        margin-bottom: auto;
    }
}

#authBtn {
    max-width: 5em;
    max-height: 2em;
    border: solid 0.1em var(--main-color);
    border-radius: 0.5em;
    background-color: var(--secondary-color);
    margin-left: auto;
    margin-right: auto;
    padding: 0.3em;
    cursor: pointer;
}


/*Global Styling*/


.content-area{
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 80vh;
    max-width: 80vw;
    margin-top: 3rem;
    margin-left: auto;
    margin-right: auto;
}

.container{
    flex-direction: column;
    align-items: center;
    justify-self: center;
    justify-content: center;
    border: solid 0.15em var(--main-color);
    border-radius: 1em;
}

button:hover{
    cursor: pointer;
}

#todo-view, #notes-app{
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: solid;
    border-color: var(--main-color);
    border-radius: 1em;
}

.add-btn{
    background: var(--secondary-color);
    border: solid;
    border-radius: 7px;
    color: var(--main-color);
    cursor: pointer;
    font-size: 1.25em;
    font-weight: bold;
    margin-bottom: 1em;
    padding: 0.75em 0;
    width: 100%;
}

#close-window-btn, #close-new-event, #close-edit-btn, #close-details-btn{
    height: 5em;
    width: 5em;
    align-self: flex-end;
    padding-top: 0.5em;
    padding-right: 1em;
}




/* Dashboard */

/* container and grid styling */
main {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background-image:
        repeating-linear-gradient(
            to right, 
            transparent 0 50px, 
            var(--tertiary-color) 50px 51px
        ),
        repeating-linear-gradient(
            to bottom, 
            transparent 0 50px, 
            var(--tertiary-color) 50px 51px
        );
}

/* contorl btn section */
#dashboard-form{
    background-color: var(--secondary-color);
    width: max-content;
    padding: 0.5em;
    margin: 1.5em auto auto auto;
    border-radius: 24px;
    border: solid 0.1em var(--main-color);
    flex-direction: row;
    gap: 1em;
}

#dashboard-form input, #dashboard-form button {
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    cursor: pointer;
    background-color: transparent;
}

#dashboard-form input::-webkit-color-swatch-wrapper {
    padding: 0;
}

#dashboard-form input::-webkit-color-swatch {
    border-radius: 50%;
}

#study-zone textarea {
    all: unset;
}

/* How notes are styled */
#study-zone .note, #study-zone .mini-timer{
    background-color: var(--secondary-color);
    width: max-content;
    border: 2px solid var(--tertiary-color);
    border-top: 30px solid var(--tertiary-color);
    border-radius: 10px;
    box-shadow: 0 5px 10px #65699a67;
    padding: 10px;
    position: absolute;
    top: 70px;
    left: 10em;
}

.mini-timer{
    display: flex;
    flex-direction: column;
}

#study-zone .note span, #study-zone .mini-timer span{
    position: absolute;
    bottom: 100%;
    right: 0;
    height: 30px;
    font-size: large;
    padding-right: 10px;
    cursor: pointer;
}





/*Timer Style*/

/* Progress bar styling*/
#timer-progress-container {
    display: none;
    width: 25vw;
    max-width: 400px;
    height: 1em;
    background: #e0e0e0;
    border-radius: 0.5em;
    margin-bottom: 1em;
    overflow: hidden;
}

#timer-progress-bar {
    height: 100%;
    width: 100%;
    background: var(--main-color);
    border-radius: 0.5em 0 0 0.5em;
    transition: width 0.2s linear;
}

/* Timer container */
#timer{
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
    margin-bottom: 2rem;
    justify-items: center;
    align-items: center;
}

/* Countdown */
#timer-display{
    font-weight: 400;
    font-size: var(--large-font);
}

@media(max-width: 570px){
    #timer-display{
        font-size: 23vw;
    }
}

#control-btns{
    display: flex;
    flex-direction: row;
    align-items: center;
    /* padding-top: 3em; */
    padding-bottom: 1em;
}

input.startStop{
    height: 7em;
    width: 7em;
}

#reset{
    height: 5em;
    width: 5em;
}

#session-type-btn{
    display: flex;
    flex-direction: row;
    gap: 1em;
    padding-bottom: 1em;
}

#session-type-btn input {
    font-weight: 500;
    font-size: 14px;
    width: 12em;
    height: 4em;
    border: 0.2em solid var(--main-color);
    border-radius: 2em;
    background: var(--secondary-color);
    cursor: pointer;
}

#edit-btn{
    display: flex;
    height: 2.5em;
    width: 2.5em;
}

#edit-time{
    display: flex;
    flex-direction: column;
    border: solid 0.12em var(--main-color);
    border-radius: 2em;
    background-color: var(--secondary-color);
    visibility: hidden;
    position: fixed;
    inset: 25px 0px 0px 0px;
    width: fit-content;
    height: fit-content;
    max-width: 100vw;
    max-height: 100dvh;
    margin: auto auto auto auto;
}

#edit-form{
    display: flex;
    flex-direction: column;
    gap: 2em;
    margin-bottom: 4em;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
    padding-left: 4em;
    padding-right: 4em;
}

#edit-form input{
    font-size: 18px;
    min-height: 2em;
    background-color: var(--secondary-color);
    border-style: solid;
    border-color: var(--main-color);
    border-width: 0.1em;
    border-radius: 0.5em;
    padding: 0em 0em 0em 1em;
}

#submit-btn{
    cursor: pointer;
}

@media (max-width: 900px) {
    #session-type-btn{
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding-bottom: 1em;
    }

    #session-type-btn input {
        font-weight: 500;
        font-size: 14px;
        width: 12em;
        height: 4em;
        border: 0.2em solid var(--main-color);
        border-radius: 2em;
        background: none;
        cursor: pointer;
    }
}



/*Notes*/

.sidebar{
    border-right: 0.15em solid var(--main-color);
    flex-shrink: 0;
    overflow-y: auto;
    padding: 1em;
    height: 76vh;
    width: 25vw;
}

#notes-preview, .main-content{
    display: flex;
    flex-direction: column;
    height: 75vh;
    padding-left: 2em;
    margin-right: auto;
    margin-left: 0;
}

.notes-list-item {
    cursor: pointer;
}

.list-item:hover, .list-item.active, .notes-list-item-selected {
    background: var(--highlight-color);
    border-radius: 0.5em;
    font-weight: bold;
}

.notes-small-title,
.notes-small-updated {
    padding: 10px;
}

.notes-small-title {
    font-size: 1.2em;
}

.notes-small-body {
    padding: 0 10px;
}

.notes-small-updated {
    color: var(--tertiary-color);
    font-style: italic;
    text-align: right;
}

.notes-title,
.notes-body {
    border: none;
    outline: none;
    background: none;
    width: 100%;
}

.notes-title, .list-header h1{
    font-size: 3em;
    font-weight: bold;
}

.list-header input {
    font-size: 1em;
    border: none;
    border-bottom: 2px solid var(--main-color);
    background-color: transparent;
    outline: none;
}

.notes-body {
    flex-grow: 1;
    font-size: 1.2em;
    line-height: 1.5;
    margin-top: 2em;
    resize: none;
}


/*ToDo List*/

#current-list-title{
    margin-top: 0;
}

.lists {
    flex-grow: 1;
    overflow-y: auto;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-list {
    color: #000000;
    margin-left: 10px;
    font-weight: bold;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.delete-list:hover {
    opacity: 1;
}

/* Progress bar styles */
.progress-container {
    width: 100%;
    height: 10px;
    background-color: var(--highlight-color);
    border-radius: 5px;
    margin-top: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--main-color);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--tertiary-color);
    margin-top: 5px;
}

.add-task {
    display: flex;
    margin-bottom: 20px;
}

.add-task input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid var(--tertiary-color);
    border-radius: 5px 0 0 5px;
    outline: none;
}

.add-task button {
    background-color: var(--main-color);
    color: var(--secondary-color);
    border: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-task button:hover {
    background-color: #5a5a5a;
}

.tasks {
    flex-grow: 1;
    overflow-y: auto;
}

.task {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    background-color: var(--secondary-color);
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    margin-right: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-weight: bold;
    background: none;
    transition: background-color 0.3s;
    font-size: 1.2em;
    outline: none;
    border: 2px solid var(--main-color);
    padding: 0.07em
}

.task-checkbox.checked {
    background-color: var(--main-color);
    color: var(--secondary-color);
}

.task-text {
    flex-grow: 1;
}

.task-text.completed {
    text-decoration: line-through;
    color: #7f8c8d;
}

.delete-task {
    color: #000000;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
}

/* Confirmation dialog styles */
.confirmation-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog-content {
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
}

.dialog-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.dialog-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
}

.cancel-btn {
    background-color: #95a5a6;
    color: var(--secondary-color);
}

.confirm-btn {
    background-color: #000000;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 200px;
    }
}





/*Main Calendar View*/

#calendar-dashboard{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

#schedule {
    height: 80vh;
    width: 45vw;
    margin-left: auto;
    margin-right: auto;
}

#schedule {
    display: grid;
    grid-template-rows: 1fr auto;
    grid-template-columns: repeat(7, 1fr);
    border: 0.15em solid var(--main-color);
    border-radius: 1em;
    width: 100%;
    box-sizing: border-box;
    margin-left: 3em;
}

/*Filters*/
#filters{
    display: flex;
    flex-direction: column;
    gap: 5vh;
    margin-left: auto;
    margin-right: auto;
}

h1#filter-header{
    margin-bottom: 0;
}

#mini-cal, #calendar-filter{
    height: 37vh;
    width: 25vw;;
}

#apply-filters-btn{
    margin-top: 2em;
}

#calendar-filter{
    display: grid;
    grid-template-rows: 1fr 3fr;
}

#filter-options{
    display: flex;
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
    gap: 1em;
}

/*Edit calendar*/
/*Views*/

#new-event, #edit-event, #event-details{
    min-height: 80vh;
    margin-top: 3em;
    margin-left: 10em;
    margin-right: 10em;
    top: 0px;
    display: none;
    flex-direction: column;
    gap: 1em;
    align-items: center;
    justify-content: start;
}

.calendar-form form input, .calendar-form form select{
    min-height: 2em;
    background-color: var(--secondary-color);
    border: solid var(--main-color) 0.1em;
    border-radius: 0.5em;
    padding: 0.3em;
}

.calendar-form input[type="color"]{
    height: 2.5em;
    width: 4em;
}

.calendar-form h1{
    font-size: 2.5em;
    font-weight: bold;
    margin: 0;
    margin-bottom: 1em;

}

#edit-event-btn{
    height: 2em;
    width: 2em;
}

.event-details{
    display: flex;
    flex-direction: column;
    align-items: center;
}

#event-details h1{
    font-size: 2.5em;
    font-weight: bold;
    margin: 0;
    margin-top: 0.5em;
}

#event-details h3{
    margin: 0;
}

#delete-event-btn{
    background-color: var(--secondary-color);
    margin: 0.5em 0;
    font-size: 0.9em;
    padding: 0.5em 1em;
    border: solid red 0.1em;
    border-radius: 0.5em;
    color: red;
    cursor: pointer;
}

#detail-time, #detail-date{
    display: flex;
    flex-direction: row;
    gap: 0.5em;
}

#new-event-form, #edit-event-form{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

#date-inputs, #time-inputs{
    display: flex;
    flex-direction: row;
    gap: 0.5em;
}

#login, #create-account-form{
    display: flex;
    flex-direction: column;
    min-width: 100vh;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    gap: 1em;
}

#login form, #create-account{
    gap: 1em;
}

h1{
    font-family: "Lexend", sans-serif;
}

#back{
    width: 2em;
    height: 2em;
}

/* Mini Calendar Styles*/
#mini-cal{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1em 0.5em;
    border-radius: 1em;
    width: 100%;
    box-sizing: border-box;
}

.mini-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    margin-bottom: 2em;
}

.mini-cal-header input[type="image"] {
    width: 1.5em;
    height: 1.5em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25em;
    transition: background 0.2s;
    border-radius: 50%;
}
.mini-cal-header input[type="image"]:hover {
    background: var(--highlight-color);
}

.monthYear {
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
    flex: 1;
}

.mini-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    margin-bottom: 0.25em;
    font-size: 0.95em;
    color: var(--main-color);
    text-align: center;
}

.mini-cal-days .day {
    padding: 0.2em 0;
    font-weight: 500;
}

#dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.2em;
    width: 100%;
    min-height: 180px;
}

.date, .date-blank {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    cursor: pointer;
    border-radius: 10%;
    transition: background 0.2s, color 0.2s;
}

.date-blank {
    background: none;
    cursor: default;
}

.date {
    background: none;
    color: var(--main-color);
    border: 1px solid transparent;
}

.date:hover {
    background: var(--highlight-color);
    color: var(--main-color);
}

.date.today {
    border: 1.5px solid var(--main-color);
    font-weight: bold;
    background: var(--highlight-color);
}

.date.selected {
    background: var(--highlight-color);
    color: var(--main-color);
    font-weight: bold;
}

@media (max-width: 600px) {
    #mini-cal {
        max-width: 95vw;
        min-width: 0;
        padding: 0.5em 0.1em;
    }
    .mini-cal-header, .mini-cal-days, #dates {
        width: 100%;
    }
}

.schedule-header {
    grid-column: span 7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: solid 1px #000000;
    max-height: 4em;
    min-width: 100%;
}

.event-timeline{
    position: relative;
    grid-column: span 7;
    display: grid;
    grid-template-rows: repeat(96, 1fr);
    grid-template-columns: repeat(14, 1fr);
    min-width: 100%;
    margin-bottom: 1em;
    overflow: scroll;
}

#view-controls, #event-btn {
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding: 0em 2em;
}

#add-event{
    width: 1.5em;
    height: 1.5em;
}



/* Profile */

hr{
    border: solid 0.07em var(--main-color);
    border-radius: 3em;
    width: 100%;
}

.settings-section{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
}

#settings{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 3em 5em;
    padding-bottom: 3em;
}

#settings input, #settings select, #calendar-tag-form input{
    padding: 0.5em 1em;
    margin-bottom: 1em;
    border: solid var(--main-color) 0.1em;
    border-radius: 0.4em;
    background: none;
    background-color: var(--secondary-color);
    font-size: 1em;
}

.default-btn, #settings input[type="submit"]{
    background-color: var(--secondary-color);
    margin: 0.5em 0;
    font-size: 0.9em;
    padding: 0.5em 1em;
    border: solid var(--main-color) 0.1em;
    border-radius: 0.5em;
}

#settings button:hover, #settings input[type="submit"]:hover{
    cursor: pointer;
}

#timer-settings{
    display: flex;
    flex-direction: column;
}

#timer-settings form{
    display: flex;
    flex-direction: column;
}

.delete-btn, #logout{
    background-color: var(--secondary-color);
    margin: 0.5em 0;
    font-size: 0.9em;
    padding: 0.5em 1em;
    border: solid red 0.1em;
    border-radius: 0.5em;
    color: red;
}

.calendar-item{
    font-size: 1.2em;
}


#overlay-container{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100vw;
    height:100vh;
    background:rgba(0,0,0,0.3);
    z-index:1000;
    align-items:center; 
    justify-content:center;
}

#howto-card{
    display: flex;
    background:var(--secondary-color); 
    padding:2em; 
    border-radius:1em; 
    min-width: 30em;
    min-height: 40em;
    position: relative;
}

#guide{
    max-height: 30em;
    overflow: scroll;
}

#close-overlay{
    position: absolute;
    top: 1em;
    right: 1em;
    float:right; 
    font-size:1.5em; 
    background:none;
    border:none; 
    cursor:pointer;
}


#fab-btn {
    position: fixed;
    bottom: 2em;
    right: 2em;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    background: var(--main-color);
    color: var(--secondary-color);
    font-size: 2em;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1100;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
#fab-btn:hover {
    background: var(--highlight-color);
    color: var(--main-color);
}