/*calendar main */

.top-bar {
    display: grid;
    grid-template-columns: auto 30em auto;
    height: 2em;
    width: 100%;
    text-align: center;
    justify-items: center;
    margin: auto;
    margin-bottom: 10px;
}

.top-bar > button {
    border-style: none;
    font: bold 1.4em "Helvetica", sans-serif;
    background-color: white;
}

.top-bar > button:hover {
    cursor: pointer;
    background-color: lightgray;
}

.calendar-main {
    margin: 0 27vw;
    width: 70vw;
    transition-duration: 0.5s;
}

#calendar-selector {
    border-style: none;
    font: bold 2em "Arial", sans-serif;
    width: 10em;
    grid-column: 2 / 3;
    grid-row: 1/2;
}

#calendar-selector:hover {
    cursor: pointer;      
}

#calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7,10vw);
    text-align: center;
}

#calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 10vw);
}

/* calendar day boxes */

.calendar-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 10vw;
    min-height: 6vw;
    border: 2px solid black;
    color: black;
    overflow-wrap: break-word;
    padding: 3px;
}
              
.calendar-day-past {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 10vw;
    min-height: 6vw;
    overflow-wrap: break-word;
    border: 2px solid gray;
    padding: 3px;
}


.today {
    border: 2px solid cornflowerblue;
    color: cornflowerblue;
    background-color: rgba(100, 148, 237, 0.212);
}

.event {
    width: 95%;
    min-height: 30px;
    border: 2px solid black;
    border-radius: 6px;
    color: black;
    overflow-wrap: break-word;
    padding: 3px;
    margin: 3px;
}

/*modals: global, day, event, month select */
.close {
    position: absolute;
    top: 0;
    right: 0;
    width: calc(1em + 10px);
    height: calc(1em + 10px);
    border-style: none;
    justify-content: center;
    align-items: center;
}

.close:hover {
    cursor: pointer;
}

.close > svg {
    transition-duration: 0.3s;
}

.close > svg:hover {
    scale: 1.25;
}

#date-storage, #event-key-storage, #date-id-storage {
    display: none;
}/*These are hidden bc they're just for information storage */

.button-bar {
    display: grid;
    grid-template-columns: repeat(4,25%);
    width: 100%;
}

.modal-header {
    display: inherit;
    width: calc(100% + 10px);
    margin-left: -5px;
    margin-bottom: 5px;
    height: calc(1em + 10px);
    color: white;
    background-color: cornflowerblue;
    padding: 5px;
    font-size: 1em;
    cursor: move;
}

.day-modal, .event-view-modal {
    display: none;
    position: fixed;
    flex-direction: column;
    top: 0;
    left: 0;
    width: 400px;
    border: 2px solid black;
    background-color: white;
    padding: 5px;
    padding-top: 0px;
}

#event-create-description {
    height: 160px;
}

#event-create-color {
    width: 50%;
}

#event-view-description {
    max-height: 160px;
    overflow-y: scroll;
    overflow-wrap: break-word;
}

.event-view-modal > .title {
    overflow-wrap: break-word
}

#event-edit-button {
    width: 100%;
    grid-column: 1 / 3;
}
        
#event-delete-button {
    width: 100%;
    grid-column: 3 / 5;
}

#month-select-modal {
    display: none;
    grid-column: 2/3;
    grid-row: 1/2;
    flex-direction: row;
    width: 100%;
}

#spinner-loader-main {
    scale: 2;
    position: absolute;
    left: 50vw;
    top: 50vh;
}