/* Note button and hover effect */
#save-note:hover .bi-floppy, #deletenote:hover .bi-trash{
    display: none;
}
#save-note .bi-floppy-fill,#deletenote .bi-trash-fill{
    display: none;
}
#save-note:hover .bi-floppy-fill,#deletenote:hover .bi-trash-fill{
    display: inline;
}
#save-note{
    font-size: 50px;
    color: white;
    padding: 25px 50px 0px 50px;
    background-color: rgb(0, 47, 255, 0.5);
    border-radius: 10px;
    border: #000000 1px solid;
}
#deletenote{
    font-size: 50px;
    color: white;
    padding: 25px 70px 0px 55px;
    background-color: rgb(0, 47, 255, 0.5);
    border-radius: 10px;
    border: #000000 1px solid;
    margin-left: 2px;
}
.save-btn, .delete-btn{
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.save-btn p, .delete-btn p{
    font-family: kanit, sans-serif;
    font-size: 44%;
    font-weight: 700;
    transform: translate(-28%, -75%);
    position: absolute;
}


/* Notepad Input */
.noted{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* margin-left:-230px ; */
}
.notepad{
    background-color: rgba(184, 184, 184, 0.7);
    margin: 20px;
    height: 90%;
    width: 50vw;
    border: #000000 1px solid;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    position: relative;
    align-items: center;
    flex-direction: column;
    margin-top: 80px;
    /* z-index: -1; */
}

@media (max-width: 495px) {
    .notepad {
        margin-top: 120px;
    }
}
@media (max-width: 750px) {
    .noted {
        margin-left:0px ;
    }
}
@media (max-width: 750px) {
    .notepad {
        width: 100% ;
    }
}
.notepad-title{
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    padding: 0px;
    font-size: 30px;
    font-weight: 700;
    justify-content: center;
}
#title-input{
    width: 90%;
    background-color: rgba(184, 184, 184, 0.7);
    font-family: kanit, sans-serif;
    font-size: 30px;
    font-weight: 700;
    text-align: center;
}
#your-note{
    border: #000000 2px solid;
    justify-content: center;
    width: 98%;
    min-height: 35vw;
}
@media (max-width: 750px) {
    #your-note {    
        min-height: 60vw;
    }
}

/* toolbar */

#text-style{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 5px; 
    margin-right: 5px;
    width: 100%;
    border: #0000002a 1px solid;
    /* box-shadow: inset #000000 0px 0px 2px 2px; */
}
#mobile-textstyle-button{
    position: fixed;
    padding: 12px; 
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.9);
    transition: background-color 0.3s ease;
    border-radius: 5px;
    z-index: 6;
    right: 1px;
    top: 121px;
    display: flex;
    justify-content: center;
    color: black;
}
#mobile-textstyle-button.active {
    background-color: #00e1ff;
    box-shadow: #000000 0px 0px 2px 2px;
}

#mobile-textstyle {
    position: fixed;
    width: auto; 
    /* background-color: #616161; */
    z-index: 1;
    left: 50px;
    top: 112px;
    display: none;
    padding: 10px; 
    opacity: 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.show-mobile-textstyle {
    display: flex !important;
    animation: slideIn 0.3s ease forwards;
}

.hide-mobile-textstyle {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}


.mobile-toolbar {
    display: flex;
    width: 100%;
    justify-content: center;
}

.mobile-style-buttons {
    display: flex;
    flex-direction: row; 
    flex-wrap: wrap;
    /* justify-content: flex-start; */
    /* width: auto;  */
    
    /* width: 50%; */
    max-width: 80%
}

.mobile-style-buttons button {
    border: 1px solid #ccc;
    padding: 8px;
    margin: 1px;
    flex: 0 0 auto; 
    min-width: 35px;
    height: 35px; 
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
}

.mobile-style-buttons button:hover {
    background-color: #c0b3b3;
}

@media (max-width: 750px) {
    .notepad {
        width: calc(100% - 12px);
        margin: 8px 6px 12px;
        margin-top: 138px;
    }

    .notepad-title {
        width: 100%;
        margin-bottom: 6px;
    }

    #title-input {
        width: 96%;
        font-size: clamp(1.7rem, 7vw, 2.2rem);
    }

    #your-note {
        width: 96%;
        min-height: clamp(48vh, 56vh, 62vh);
    }

    .save-btn {
        width: 96%;
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        margin-bottom: 8px;
    }

    #save-note,
    #deletenote {
        width: 50%;
        font-size: clamp(2rem, 8vw, 2.3rem);
        padding: 12px 6px 2px;
        margin-left: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    .save-btn p,
    .delete-btn p {
        position: static;
        transform: none;
        margin: 0 0 4px;
        font-size: 0.7em;
        line-height: 1;
    }

    #mobile-textstyle-button {
        top: 180px;
        right: 10px;
        bottom: auto;
        padding: 10px 12px;
        border-radius: 999px;
        border: 1px solid rgba(0, 0, 0, 0.5);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        background-color: rgba(255, 255, 255, 0.95);
        z-index: 3;
    }

    #mobile-textstyle {
        left: 8px;
        right: 8px;
        top: 50px;
        bottom: auto;
        width: auto;
        padding: 8px;
        border-radius: 12px;
        border: 1px solid rgba(0, 0, 0, 0.35);
        background: rgba(245, 245, 245, 0.98);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
        transform: translateY(16px);
        max-height: 42vh;
        overflow-y: auto;
        z-index: 2;
    }

    .show-mobile-textstyle {
        animation: mobileSheetIn 0.2s ease forwards;
    }

    .hide-mobile-textstyle {
        animation: mobileSheetOut 0.2s ease forwards;
    }

    .mobile-style-buttons {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 4px;
    }

    .mobile-style-buttons button {
        width: 100%;
        min-width: 0;
        height: 40px;
        padding: 0;
    }
}

@media (max-width: 495px) {
    .notepad {
        margin-top: 146px;
    }

    #your-note {
        min-height: clamp(50vh, 58vh, 66vh);
    }

    .mobile-style-buttons {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@keyframes mobileSheetIn {
    from {
        transform: translateY(16px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes mobileSheetOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(16px);
        opacity: 0;
    }
}


button{
    font-size: 14px;
}


.toolbar {
    background-color: #f0f0f0;
    /* margin: 5px; */
    padding: 2px;
    margin-bottom: -20px;
    display: flex;
    position: relative;
    justify-content: center;
    width: 100%;
    border: 1px solid #000000;
}
/* @media (max-width: 1058px){
    .toolbar {
        left: -5%;
    }
} */
@media (max-width: 750px){
    .toolbar {
        /* position: fixed; */
        /* margin: 10px 0px 0px 15px; */
        /* top: auto; */
        display: flex;
        flex-flow: row wrap;
        /* bottom: 0; */
        justify-content: center;
        /* left: 0;
        right: 0; */
    }
}

.style-buttons button {
    background-color: white;
    border: 1px solid #ccc;
    padding: 5px 10px;
    cursor: pointer;
    display: inline-flex;
    /* justify-content: center; */
    justify-content: space-evenly;
}

@media (max-width: 750px){
    .style-buttons button {
        display: wrap;
        width: 130px;
        height: 50px;
        max-width: 99%;
    }
}
.style-buttons{
    display: none;
    
    transition: transform 0.5s ease;
}

.style-buttons button:hover {
    background-color: #ddd;
}

@media (max-width: 750px){
    #settings-textstyle{
        display: none;
    }

}
@media (min-width: 750px){
    #settings-textstyle{
        display: block;
    }

}