@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;500&family=Poppins:wght@400;500&display=swap');

:root {
    /*========== Colors ==========*/
    /*Color mode HSL(hue, saturation, lightness)*/
    --white-color: hsl(0, 0%, 100%);
    --black-color: hsl(0, 0%, 0%);
    --font-color:#273251;
    /*========== Font and typography ==========*/
    /*.5rem = 8px | 1rem = 16px ...*/
    --body-font: "Kanit", sans-serif;
    --h1-font-size: 1.75rem;
    --normal-font-size: .8rem;
    --small-font-size: .813rem;
    /*========== Font weight ==========*/
    --font-medium: 500;

    --main-radius:5px;
    --main-padding:5px;
  }

*{
    margin:0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Kanit",sans-serif;
}

a{
    text-decoration: none;
}

/* Reset some default styles */
body, h1, h2, ul, li, a {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    font-family: var(--body-font);
   
  }


.container-main{
    display: grid;
    height: 100vh;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 0.2fr 1.5fr 1.2fr 0.8fr;
    grid-template-areas: 
      "nav nav nav nav"
      "sidebar main main main"
      "sidebar content1 . ."
      "sidebar footer footer footer";
    grid-gap:0.2rem;
}

.container-regis{
  display: grid;
  height: 100vh;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 0.2fr 1.5fr 1.2fr 0.8fr;
  grid-template-areas: 
    "nav nav nav nav"
    "main main main main"
    "sidebar content1 . ."
    "sidebar footer footer footer";
  grid-gap:0.2rem;
}
nav{
    background: #213760;
    grid-area: nav;
    border-radius: var(--main-radius);
    padding-top: var(--main-padding);
}
main{
    background: #fff;
    grid-area: main;
    height: 100vh;
}

button{
  background: #213760;
  width: 30%;
  height: 45px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 10px;
  border: none;
  color: #fff;
  margin-bottom: 20px;
}


button:hover{
  background: #5081db;
}


.card{
 background: none;
}
#sidebar{
    background: #fff;
    grid-area: sidebar;
}

#content1{
    background: #6fffd2;
    grid-area: content1;
}

footer{
    background: #1de9;
    grid-area: footer;
}

.logo_title {
    display: flex;
    align-items: center;
    margin: 0;
    background: #ffff;
    width: 340px;
    height: 80px;
    padding: 20px;
    justify-content: space-between;
    top:0;
}


.icon_menu{
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

#sidebar{
    position: absolute;
    left: 0;
    top:150px;
    width: 300px;
    height: 100%;
    
}

#sidebar ul  a{
    display: block;
    height: 100%;
    width: 100%;
    line-height: 65px;
    font-size: 14px;
    color: #302f2f;
    padding-left: 20px;
    box-sizing: border-box;
    border-top: 1px solid rgba(255,255,255,.1);
    transition: .4s;
}

#sidebar ul li:hover a{
    padding-left: 20px;
}

.textstyle{
    position:relative;
    color: var(--white-color);
    font-size: 18px;
    padding: 5px 0;
}



@media only screen and (max-width: 940px) {
    .container-main{
        grid-template-columns: 1fr;
        grid-template-rows: 0.4fr 0.4fr 2.2fr 1.2fr 1.2fr 1.2fr 1fr;
        grid-template-areas: 
        "nav"
        "main"
        "content1"
        "footer";
    }

    #sidebar {
        display: none; /* Hide the sidebar */
    }

    .logo_title {
        display: flex;
        align-items: center;
        margin: 0;
        background: #ffff;
        width: 50%;
        height: 20px;
        padding: 20px;
        justify-content: space-between;
        top:0;
    
    }
    
     nav ul.menu {
        display: none; /* ซ่อนเมนูเมื่ออยู่บนหน้าจอเล็ก */
        flex-direction: column; /* จัดเมนูเป็นแนวตั้งสำหรับมือถือ */
        align-items: center; /* จัดกึ่งกลางแนวตั้ง */
        width: 100%;
        background-color: #f8f9fa; /* พื้นหลังสำหรับมือถือ */
        position: absolute;
        top: 50px;
        left: 0;
        z-index: 1000;
    }

    input[type="checkbox"]:checked ~ ul.menu {
        display: flex; /* แสดงเมนูเมื่อกดที่ปุ่มเมนู */
    }

    /* ปรับสไตล์สำหรับเมนูบนมือถือ */
    nav ul.menu li {
        margin: 10px 0;
    }
    
}

/* Apply styles to the file input */
input[type="file"].form-control {
  padding: 10px; /* Adjust padding as needed */
  background-color: #f4f4f4; /* Background color */
  border: 1px solid #ccc; /* Border */
  color: #333; /* Text color */
  /* Add any other styles you want */
}

/* Hide the default file input button */
input[type="file"].form-control::-webkit-file-upload-button {
  visibility: hidden;
}

/* Style the custom file input button */
input[type="file"].form-control::before {
  content: 'Choose File'; /* Text for the button */
  display: inline-block;
  padding: 8px 12px; /* Adjust padding as needed */
  background-color: #007bff; /* Button background color */
  color: #fff; /* Button text color */
  border: none;
  cursor: pointer;
  
}

/* Style the custom file input button on hover */
input[type="file"].form-control:hover::before {
  background-color: #0056b3; /* Button background color on hover */
}