@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@100;300;400;500;700;900&display=swap');

*{
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
    font-family: 'Kanit', sans-serif;
}
.conntainer{
    width: 100%;
    position: relative;
    margin: 0px;
    padding: 20px 0px;
}
.tt-board{
    width: 900px;
    max-width: 90%;
    margin:0 auto;
    padding: 5px;
    border: solid 1px #bbb;
}
.tt-board button{
    padding: 5px 10px;
    margin: 3px;
}
.tt-board button:hover{
    cursor: pointer;
    border: solid 2px rgb(0, 0, 0);
}
.tt-board .btn-info{
    background-color:seagreen;
    color:#fff;
    font-weight: 500;
    font-size: 16px;
    border: solid 2px seagreen;
}
.header-label{
    width: 100%;
    background-color: aquamarine;
    padding:10px;
    border-left: solid 5px #333;
}
.header-label h3{
    font-size: 28px;
    color: 333;
    font-weight: 700;
}
.b-body{
    width: 100%;
    height: max-content;
}
.b-body .main_pagination{
    display: flex;
    gap: 3px;
    margin: 3px 0;
}
.b-body #previous,#forward,#nowpage{
    font-size: medium;
    font-weight: 600;
    width: max-content;
    padding: 5px 10px;
    color:black;
}
.b-body #previous:hover,#forward:hover{
    cursor: pointer;
    color: #888;
}
.b-body #nowpage{
    background-color: #ccc;
}
.b-body table{
    width: 100%;
    height: max-content;
    font-size: 14px;
}
.b-body table,thead,tbody,tr,th,td{
    border: solid 1px #333;
    border-collapse: collapse;
    padding: 3px;
}
.b-body thead{
    background-color: aquamarine;
}

.b-body th:nth-child(1), td:nth-child(1){
    width:auto;
    text-align:start;
}
.b-body th:nth-child(2), td:nth-child(2){
    width:100px;
    text-align: center;
}
.b-body th:nth-child(3), td:nth-child(3){
    width:60px;
    text-align: center;
}
.b-body th:nth-child(4), td:nth-child(4){
    width:60px;
    text-align: center;
}
.b-body th:nth-child(5), td:nth-child(5){
    width:100px;
    text-align: center;
}
.b-body tbody tr:nth-of-type(odd){
    background-color: whitesmoke;
}
.b-body tbody tr td:nth-child(1):hover{
    cursor: pointer;
}
.b-body tbody tr:hover{
    background-color: rgb(127, 255, 212,0.2);
}

@media only screen and (max-width: 768px) {
    .b-body th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4), th:nth-child(5), td:nth-child(5){
        display: none;
    }
}
.b-footer{
    margin-top: 15px;
}
.b-footer a{
    font-size: 11px;
    font-weight: 700;
    color: #bbb;
}
.b-footer a:hover{
    cursor: pointer;
    color: #888;
}

/* input topic */
.add-topic{
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 9;
    width: 100%;
    height:100%;
    min-height:100vh;
    background-color: rgb(51, 51, 51,0.5);
    display:none;
    justify-content: center;
    align-items: flex-start;
}
.input-topic{
    display: block;
    position: relative;
    width: fit-content;
    background-color: #fff;
    border: solid 1px #eee;
    padding: 20px;
    margin: 20px 0px;
}
.input-topic .close-btn{
    display: flex;
    position: absolute;
    width: fit-content;
    height: fit-content;
    top:2px;
    right:2px;
    justify-content: center;
    align-items: center;
    color: #000;
    text-shadow: 0px 0px 5px #000;
}
.input-topic .close-btn:hover{
    cursor: pointer;
    color: red;
}
.input-topic .input-group{
    margin: 3px 0;
}
.input-topic button{
    padding:5px 10px;
    background-color: seagreen;
    color: #fff;
    border:solid 2px seagreen;
}
.input-topic button:hover{
    cursor: pointer;
    border:solid 2px black;
}
.input-topic input, textarea{
    padding: 5px;
    width:100%;
}
.input-group{
    display:flex;
    gap:3px;
    justify-content: start;
    align-items: center;
}
.input-group div{
    width:30px;
}

/* read topic */
.read_topic{
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9;
    width: 100%;
    height:max-content;
    min-height:100vh;
    background-color: rgb(51, 51, 51,0.5);
    display:none;
    justify-content: center;
    align-items: flex-start;
}
.frame_read{
    width:95%;
    max-width: 800px;
    background-color: whitesmoke;
    border:solid 1px #bbb;
    display: flex;
    margin: 20px 0;
    flex-direction: column;
    padding:8px;
    position: relative;
}
.frame_read .close_read{
    display: flex;
    position: absolute;
    width: fit-content;
    height: fit-content;
    top:2px;
    right:2px;
    justify-content: center;
    align-items: center;
    color: #000;
    text-shadow: 0px 0px 5px #000;
}
.frame_read .close_read:hover{
    cursor: pointer;
    color: red;
}
.subject_topic{
    padding: 5px 0px 5px 5px;
    border-left: solid 5px green;
    font-size:medium;
}
.details_topic{
    background-color: rgba(251, 255, 188, 0.7);
    padding: 3px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.details_topic .topic_write{
    color: #333;
    font-size: small;
    font-weight: 600;
}
.details_topic #read_details{
    color: black;
    margin: 8px 0;
}
.details_topic #go_reply{
    width: max-content;
    padding: 5px 10px;
    font-size: medium;
    font-weight: 500;
    color: white;
    background-color: seagreen;
    border: seagreen 2px solid;
}
.details_topic #go_reply:hover{
    cursor: pointer;
    border: black 2px solid;
}
.reply_topic{
    border:#888 0.5px dashed;
    padding: 3px;
    margin: 3px 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.reply_topic .item{
    background-color: #ddd;
    padding: 3px;
    display: flex;
    flex-direction: column;
}
.reply_topic .item:nth-of-type(odd){
    background-color: #eee;
}
.reply_topic .item .reply_by{
    color:black;
    font-size: small;
    font-weight: 600;
}
.reply_topic .item .when_reply{
    color:#333;
    font-size: x-small;
    font-weight: 600;
}
.reply_topic .item .reply_txt{
    color:#000;
    font-size: medium;
    font-weight: 400;
    padding: 15px;
}
.page_reply{
    display: flex;
    gap: 3px;
}
.page_reply #previous,#forward,#nowpage{
    font-size: medium;
    font-weight: 600;
    width: max-content;
    padding: 5px 10px;
    color:black;
}
.page_reply #previous:hover,#forward:hover{
    cursor: pointer;
    color: #888;
}
.page_reply #nowpage{
    background-color: #ccc;
}

/* reply topic */
.add_reply{
    position: absolute;
    top: 0;
    left: 0;
    z-index: 19;
    width: 100%;
    height:100%;
    min-height:100vh;
    background-color: rgb(51, 51, 51,0.5);
    display:none;
    justify-content: center;
    align-items: flex-start;
}
.frame_reply{
    width:95%;
    max-width: 800px;
    background-color: whitesmoke;
    border:solid 1px #bbb;
    display: flex;
    margin: 20px 0;
    flex-direction: column;
    padding:8px;
    position: relative;
    gap:3px;
}
.frame_reply .close_reply{
    display: flex;
    position: absolute;
    width: fit-content;
    height: fit-content;
    top:2px;
    right:2px;
    justify-content: center;
    align-items: center;
    color: #000;
    text-shadow: 0px 0px 5px #000;
}
.frame_reply .close_reply:hover{
    cursor: pointer;
    color: red;
}
.frame_reply select{
    width: max-content;
    padding: 5px;
}
.frame_reply input, textarea{
    padding: 5px;
    width:100%;
}
.frame_reply button{
    padding:5px 10px;
    background-color: seagreen;
    color: #fff;
    border:solid 2px seagreen;
    width: max-content;
}
.frame_reply button:hover{
    cursor: pointer;
    border:solid 2px black;
}

/* admin */
.btn_delete{
    width: max-content;
    padding:5px 8px;
    background-color: red;
    border: darkred 2px solid;
    color: #fff;
    font-size: smaller;
}
.btn_delete:hover{
    cursor: pointer;
    color: lightgoldenrodyellow;
}

/* login */
.loginframe{
    margin:20px auto;
    width:480px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding:30px;
    border:aquamarine 3px solid;
    align-items: center;
}
.loginframe input{
    padding: 3px;
    width:80%;
}
.loginframe #login_submit{
    width: max-content;
    padding: 5px 10px;
    font-size: medium;
    font-weight: 500;
    color: white;
    background-color: seagreen;
    border: seagreen 2px solid;
}
.loginframe #login_submit:hover{
    cursor: pointer;
    border: black 2px solid;
}
.loginframe h3{
    color: darkturquoise;
}