/* || General Consistent Element Styles */

*, *::before, *::after {
    box-sizing: border-box;
}

*:focus {
    outline: 2px #487B91 solid;
}

html {
    font-family: Roboto, Calibri, Arial, sans-serif;
    font-size: 100%;
    height: 100%;
}

body {
    position: relative;
    background-color: #fcfcfc;
    margin: 0;
    min-width: 221px;
    line-height: 20pt;
    height: 100%;
    overflow-y: scroll;
}

header {
    background-color: #d9d9d9;
}

main {
    height: 100%;
    margin: 1px;
    padding-bottom: 30px;
}

nav {
    background-color: #f0f0f0;
}

h1 {
    background-color: #487B91;
    color: white;
    font-size: 1.5rem;
    margin: 0;
    padding: 1.5rem;
    text-align: center;
}

h2 {
    font-weight: bolder;
    font-size: 1rem;
    margin: 0;
}

label {
    display: block;
    margin: 15px 2px 10px 2px;
}

textarea {
    display: block;
    border-radius: 3px;
    resize: none;
    width: calc(100% - 2px);
    height: 40vh;
    font-size: inherit;
    font-family: inherit;
    padding: 0.5rem;
    margin: 2px 1px;
}

input {
    border: 1px #858585 solid;
    border-radius: 5px;
    font-size: 1rem;
    margin: 1px 0px;
    padding: 0.5rem;
    width: 100%;
}

input:focus, textarea:focus {
    outline: 1px #e3e7e7 solid;
}

button {
    background-color: #f0f0f0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
}

button:hover, .book-title:hover {
    background-color: #d9d9d9;
    cursor: pointer;
}

ul {
    list-style: none;
    padding: 0;
}

ul li button {
    list-style: none;
    margin: 5px 1px;
    width: calc(100% - 2px);
    border: 1px grey dashed;
}

/*classes*/

.new-work {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: #487B91;
    border-radius: 0px;
    color: #FFFFFF;
    list-style: none;
    margin: 5px 0px;
    width: 100%;
    text-align: left;
}

.new-work:hover {
    background-color: #d9d9d9;
    color: black;
}

.toggle-button {
    background-color: #fcfcfc;
    border-top: 0.5px #F0F0F0F0 solid;
    border-bottom: 0.5px #F0F0F0F0 solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
}

.backbutton {
    padding: 5px 0;
}

.backbutton button {
    width: 20%;
}

.toggle-button-item {
    background-color: #f0f0f0;
    width: 40%;
    min-width: 90px;
}

.toggle-button-active, .active {
    background-color: #d9d9d9;
    outline: 1px #d9d9d9 solid;
}

.post-container {
    margin: 50px 1px 10px 2px;
}

.post-content {
    overflow-wrap: anywhere;
}

.post-title {
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow-wrap: anywhere;
    padding: 0.5rem 14px;
    margin-bottom: 1px;
}

.post-title box-icon {
    display: inline-block;
    margin-right: 15px;
}

.post-body {
    display: flex;
    border-radius: 5px;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    padding: 0.5rem 14px;
    line-height: 18pt;
    min-height: 200px;
}

.post-tag {
    display: flex;
    flex-wrap: wrap;
    background-color: #f0f0f0;
    margin: 0;
    padding: 15px;
    gap: 0.9em;
}

.post-tag li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    gap: 10px;
    border: 1px #8f9597 solid;
    border-radius: 20px;
    padding: 0 1em;
}

.post-tag li input[type=checkbox] {
    width: 20px;
}

.post-tag li button, .comment-list-item button {
    background-color: transparent;
    color: tomato;
    width: 20px;
    border: none;
    padding: 5px;
    font-size: 0.8rem;
}

.comment-list {
    background-color: #d8d4d4e0;
    padding: 10px;
    border-radius: 5px;
    margin: 2px;

}

.post-comment-form {
    display: flex;
    align-items: center;
    margin: 1px 0;
}

.comment-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background-color: #f0f0f0;
    padding: 0 15px;
}

.comment-list-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.comment-list-item button {
    width: 15px;
}

.comment-submit {
    height: 36px;
}

.post-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1px;
}

.tag-button {
    background-color: #f0f0f0;
    width: 25%;
    font-size: 0.8rem;
    height: 31px;
}

.comment-button {
    background-color: #f0f0f0;
    width: calc(75% - 4px);
    font-size: 0.8rem;
    height: 31px;
}

.navigation-list {
    margin: 0;
}

.navigation-item {
    border: none;
}

.book-title {
    display: block;
    text-align: center;
    margin-bottom: 15px;
    padding-top: 10px;
    gap: 10px;
}

.dropdown-menu {
    font-size: 1rem;
    padding: 0;
    margin: 0;
}

.book-title h2 {
    word-wrap: break-word;
    font-weight: bolder;
    font-size: 1.4rem;
}

.navigation-menu{
    display: none;
}

.page-edit {
    margin-bottom: 15px;
    text-align: right;
}

.menu-list, .tool-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border: 1px grey solid;
    gap: 10px;
    padding: 5px;
    margin: 0;
}

.menu-list .active {
    background-color: #487B91;
    color: #FFFFFF;
}

.tool-list {
    border-top: none;
}

.options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.book-view {
    background-color: #f0f0f0;
}


#post-submit {
    width: 20%;
    margin: 15px 0 0 2px;
    border: 1px #8f9597 solid;
}

#search {
    background-color: #d9d9d9;
    position: relative;
}

#search button {
    background-color: transparent;
    position: absolute;
    top: 4px;
    right: 3px;
}

/* rich text editor */
select {
    padding: 7px;
    border: 1px solid #020929;
    border-radius: 3px;
}

.options label,
.options select {
    font-family: "Poppins", sans-serif;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    width: 60px;
    height: 38px;
    border: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch {
    border-radius: 15px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px #020929;
}

input[type="color"]::-moz-color-swatch {
    border-radius: 15px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px #020929;
}

#text-input {
    margin-top: 10px;
    padding: 20px;
    border: 1px solid black;
    min-height: 40vh;
    height: auto;
    overflow-x: auto;
    overflow-wrap: anywhere;
}

#text-input ul{
    list-style: disc;
    padding-left: 40px; 
}

#root h1, #text-input h1 {
    background-color: unset;
    color: unset;
    text-align: unset;
    padding: unset;
    margin: unset;
    font-size: 1.6em;
}

#text-input h2 {
    font-size: 1.4em;
}

.error {
    color: tomato;
}

.hidden {
    display: none;
}

#root {
    padding: 10px;
}

/* media queries for medium and large size screen */
@media (min-width: 700px) {
    body {
        display: grid;
        grid-template-columns: 215px  auto;
        grid-template-rows: 117px auto;
    }

    header {
        padding: 1px;
        position: fixed;
        top: 0;
        left: 0;
        width: 200px;
        height: 110px;
        grid-column: 1/2;
        grid-row: 1/2;
        border-right: 1px #858585 solid;
    }

    h1 {
        font-size: 1.3rem;
        padding: 40px;
    }

    nav {
        padding-right: 1px;
        position: fixed;
        top: 145px;
        left: 0;
        width: 200px;
        height: 100%;
        grid-column: 1/2;
        grid-row: 2/3;
        border-right: 1px #858585 solid;
    }

    main {
        display: grid;
        grid-template-rows: 117px auto;
        grid-column: 2/3;
        grid-row: 1/3;
        margin: 0px auto;
        width: 450px;
    }

    #search {
        width: 199px;
        background-color: #f0f0f0;
        position: relative;
        height: 37px;
        border-right: 1px #858585 solid;
    }

    .new-work {
        position: relative;
    }

    .new-work .plus {
        position: absolute;
        right: 10px;
    }

    .toggle-button {
        grid-row: 1/2;
        top: 0;
    }

    .book-title {
        border-top: 1px #858585 solid;
        border-bottom: 1px #858585 solid;
        padding: 15px;
    }

    .book-title:hover {
        background-color: transparent;
        cursor: unset;
    }

    .dropdown-menu {
        display: none;
    }

    .toggledown {
        display: block;
    }

    .pagelist {
        overflow: auto;
        height: 58vh;
    }

    #text-input {
        height: 50vh;
    }

}

@media (min-width: 850px) {
    header, nav {
        width: 215px;
    }

    #search {
        width: 214px;
    }

    nav {
        width: 215px;
    }

    main {
        display: grid;
        grid-template-rows: 117px auto;
        grid-column: 2/3;
        grid-row: 1/3;
        margin: 0px auto;
        width: 450px;
    }

    main {
        min-width: 580px;
    }

}


@media (min-width: 1000px) {

    body {
        grid-template-columns: 300px  auto;
    }
    

    header, nav {
        width: 300px;
    }

    #search {
        width: 299px;
    }

    main {
        max-width: 650px;
    }
}
