body {
    background-color: #f7f7f7;
    font-family: 'McLaren', sans-serif;
    text-align: center;
    color: #634646;
}

h1 {
    font-size: 25px;
    margin-top: 45px;
    margin-bottom: 35px;
    color: #7E5E5E;
}

#mood {
    background: linear-gradient(to right, rgb(107, 158, 185), rgb(218, 170, 195), rgb(235, 200, 195));
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
}

#board {
    border:solid;
    border-color: #6F4A20;
    width:80%;
    height: fit-content;
    margin:auto;
    padding-bottom:15px;
    margin-bottom:20px;
    font-size:16px;
    border-radius: 10px;
}

nav {
    display: flex;
    justify-content: space-between;
    background-color: #C09C9C;
    border-radius: 8px 8px 0 0;
}

/* board */
#addEntry {
    margin: 13px;
    margin-left:20px;
    padding: 5px 10px;
    background-color: #d9d9d968;
    font-family: 'McLaren', sans-serif;
    font-size:16px;
    color: #F9F9F9;
    border:none;
    border-radius:5px;
    cursor:pointer;
}

#addEntry:hover {
    background-color: #d9d9d950;
}

#addEntry:active {
    background-color: #d9d9d92e;
}

#date {
    margin: 13px;
    margin-right:33px;
    padding: 5px 0;
    color: #F9F9F9;
}

#calendar {
    height: 65%;
    margin: 30px;
    margin-bottom:20px;
    display: grid;
    grid-template-rows: auto 1fr; 
    grid-template-columns: 13% 87%;
}

#days {
    margin:2px;
    display: grid;
    grid-template-columns: repeat(31, 1fr);
    column-gap: 1.5px;
}

#boxes {
    border:solid #574a3c9c;
    border-radius:5px;
    display: grid;
    grid-template-rows: repeat(12, 1fr);
}

.boxMonth {
    display:grid;
    grid-template-columns: repeat(31, 1fr);
}

#fullMonths {
    width:auto;
    display: grid;
    grid-template-rows: repeat(12, 1fr);
    row-gap: 1.5px;
    margin:2px;
}

#smolMonths, #tiniMonths {
    display:none;
}

.day {
    padding: 4px 0;
    background-color: #C09C9C;
    border-radius:3px;
    color: #F9F9F9;
    font-size: 13px;
}

.month {
    text-align:right;
    padding: 3px 10px;
    background-color: #C09C9C;
    border-radius:5px;
    color: #F9F9F9;
    font-size: 13px;
}

.box{
    border: 0.5px solid #574a3c3a; 
    background-color:rgb(238, 238, 238);
}

.highlighted {
    border: 1px solid #995744;
}

.firstCol { border-left: 0; }
.lastCol { border-right: 0; }
.firstRow { border-top: 0; }
.lastRow { border-bottom: 0; }

/* color slider */

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    margin: 10px auto;
  }

input::-webkit-slider-runnable-track {
    width: 100%;
    height: 23px;
   
    background: linear-gradient(to right, rgb(138, 186, 211), rgb(237, 194, 216), rgb(252, 246, 245));

    border-radius: 7px;
    border: 1px solid #7E5E5E;
}

#slide::-webkit-slider-thumb{
    -webkit-appearance: none;
}

#slideLabels {
    display: flex;
    margin: -3px 3px;
    justify-content: space-between;
    font-size: 12px;
}

#color-container {
    width:50%;
    margin:auto;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap:2%;
    margin-bottom: 10px;
}

#average {
    margin: 10px auto;
    width: 22px; 
    height: 22px;
    border-radius: 7px;
    border: 1px solid #7E5E5E;
}

#avgLabels, #averageLabels {
    font-size: 12px;
    margin: -5px 3px;
}

#avgLabels {
    display:none;
}

/* adding an entry */
#popup {
    display: none;
    position: fixed;
    top: 45%;
    left: 50%;
    width: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border: 1px solid #7E5E5E;
}

#datePopup {
    margin-top: -10px;
    margin-bottom: 10px;
    border: 1px solid rgb(72, 47, 18); 
    color: rgb(72, 47, 18);
}


#picker::-webkit-slider-runnable-track{
    cursor: pointer;
    margin-top:5px;
}

#picker::-webkit-slider-thumb{
    border: 1px solid #7E5E5E;
    height: 20px;
    width: 10px;
    border-radius: 25px;
    background-color: #FFFFFF;
    opacity: 80%;
    cursor: pointer;
    -webkit-appearance: none;
}
  
#error {
    display:none;
    font-size:10px;
    margin-bottom:5px;
}

#overlay {
    display:none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25); /* Semi-transparent gray background */
}

@keyframes fadein {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeout {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

#exit, #submit, #reset, #note {
    font-family: 'McLaren', sans-serif;
    border:none;
    border-radius: 4px;
}

#submit:hover {
    background-color: #cdaeae;
}

#submit:active {
    background-color: #d5baba;
}

#submit {
    color: #F9F9F9;
    background-color: #c7a3a3;
    padding:5px;
    width:70px;
    cursor:pointer;
}

#exit, #reset, #note {
    color: #856969;
    background-color: #f2eaea;
    position:absolute;
    cursor:pointer;
}

#exit {
    right:8px;
    top:8px;
}

#reset {
    right:20px;
    top:35%;
    font-size:10px;
}
/* 
#note {
    font-size:10px;
    top:35%;
    resize:none;
    height:13px;
    left:20px;
    white-space: nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    width:20%;
    text-align: left;
    padding-left: 5px;
} */

#note {
    width:20%;
    text-align: left;
    padding-left: 5px;
    left:20px;
    font-size:10px;
    top: 35%;
}

::placeholder {
    color: #8569699d;
}

#exit:hover, #reset:hover, #note:hover {
    background-color: #ebe1e1;
}

#exit:active, #reset:active, #note:active {
    background-color: #dfd4d4;
}









@media only screen and (max-width: 1200px) {
    #board {
        width:950px;
    }
}

@media only screen and (max-width: 950px) {
    #board {
        width:100%
    }
}

@media only screen and (max-width: 830px) {
    #board {
        width:100%;
        margin:0;
        margin-bottom:20px;
    }

    #calendar {
        grid-template-columns: 5% 95%;
        grid-template-areas:
          "placeholder months"
          "days boxes";
    }
      
    #placeholder {
        grid-area: placeholder;
    }
      
    #fullMonths, #tiniMonths {
        display:none;
    }

    #smolMonths {
        display:grid;
        grid-area: months;
        width:auto;
        grid-template-columns: repeat(12, 1fr);
    }

    .month {
        text-align: center;
        margin:1px;
        margin-bottom:2px;
    }
      
    #days {
        grid-area: days;
        grid-template-columns: none;
        column-gap: none;
        grid-template-rows: repeat(31, 1fr);
        row-gap: 1.5px;
    }
      
    #boxes {
        grid-area: boxes;
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: none;
    }
    
    .boxMonth {
        grid-template-rows: repeat(31, 1fr);
        grid-template-columns: none;
    }

    .box {
        border: 0.5px solid #574a3c3a;
    }

    .highlighted {
        border: 1px solid #995744;
    }

    .firstCol { 
        border-top:0;
    }
    .lastCol { 
        border-bottom:0;
    }
    .firstRow { 
        border-left:0;
    }
    .lastRow { 
        border-right:0;
    }

    #calendar {
        margin:15px;
        grid-template-columns: 8% 92%;
    }

    #color-container {
        width:80%;
    }
}

@media only screen and (max-width: 650px) {
    #popup {
        width:70%;
    }

    #smolMonths, #tiniMonths {
        display:none;
    }

    #tiniMonths {
        display:grid;
        grid-area: months;
        width:auto;
        grid-template-columns: repeat(12, 1fr);
    }

    .month {
        padding: 3px 0;
        border-radius:4px;
    }

    #reset {
        top: 85%;
        right:8px;
        height:fit-content;
    }

    #note {
        top: 85%;
        left: 8px;
        height:fit-content;
    }

    #board, #boxes {
        border-width: 1px;
    }

    #avgLabels {
        display:block;
    }
    #averageLabels {
        display:none;
    }
}

@media only screen and (max-width: 400px) {
    h1 {font-size: 20px;}
    #addEntry, #date {margin: 13px;}
    #addEntry, #board {
        font-size:12px;
    }
    .day, .month, #avgLabels, #averageLabels {
        font-size:10px;
    }
}
