@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

*{
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;   
    color: #fff;
    overflow-x: hidden; 
}

header {
    width: calc(100vw - 150px);
    height: 100px;
    background: #3717D3;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 150px;
}
    
header h1 {
    color: white;
}

footer {
    width: 100vw;
    height: 100px;
    background: #3717D3;
    display: flex;
    justify-content: center;
    align-items: center;
}

body {
    min-height: 100vh;
    min-width: 100vw;

}

nav {
    display: flex;
    flex-direction: column;
    width: 150px;
    height: 100%;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 0;
    top: 0;
    background: #3717D3;
}

nav a{
    padding: 20px 0 20px 0;
    color: #fff;;
    text-decoration: none;;
    border-bottom: 1px solid #fff;
    width: 150px;
    text-align: center;
    background: #3717D3;
    transition: background-color 0.3s ease;
    font-weight: bold;
    font-size: 18px;
}

nav a:hover{
    background: #fff;
    color: #3717D3;
}

.main-width {
    width: calc(100vw - 150px);
    margin-left: 150px;
    min-height: calc(100vh - 200px);
    background-color: #F6F6F6;
  
}

.logout{
    margin-top: 10px;
    background: red;
    width: 130px;
    border: 0px;
    border-radius:10px;

}

.logout:hover{
    background: #fff;
    color: red;
}
            /* Logga In/Skapa Konto */
/*--------------------------------------------------*/

.account-entry{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 800px;
    padding: 100px 0px 100px 0px;
    margin: 20vh 0;
}

.account-entry-header {
    width: 100vw;
    margin-left: 0px;}

.account-entry-body{
    background: #E9EEF1;
}

.account-entry img {
 border-radius: 20px 0px 0px 20px;
 width:  30%;
 height: 100%;
}

.account-entry-section{
    width:30%;
    height: 100%;
    border-radius: 0px 20px 20px 0px;
    background: #431FF4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

}

.account-entry-form{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    height: 50%;
    width:70%;
}

.account-entry-section h1{
    color: #fff;
}

.account-entry-form div{
    display: flex;
    flex-direction: column;
    height: 20%;
    width: 100%;

}

.account-entry-form div label{
color: #fff;
font-size: 18px;
margin-left:0.25rem;
}

.account-entry-form div input{
height: 50%;
border-radius: 8px;
font-size: 24px;
border: 0px;
color: #000;
}

.account-entry-form div button{
  background: #F6F6F6;
  width: 100%;
  height: 50%;
  border: 0px;
  font-size: 24px;
  color: #000;
  border-radius:8px
}

.account-entry-form  div p{
    margin-top:0.5rem;
    color: #fff;
    font-size: 18px;
    align-self: end;
    overflow-y: hidden;
}

.account-entry-form  div p a{
    color: #fff;
    font-size: 18px;
}

@media (max-width: 1024px) {

}

            /* StartSida */
/*--------------------------------------------------*/
.index-section{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.index-section:last-child{
    margin-bottom: 15vh;
}


.index-section-flexbox{
    display: flex;
   flex-direction: column;
   align-items: center;
   width: 60%;
   background-color: #3717D3;
   border-radius: 50px;
   margin: 2vh;
}

.index-section h2{
    margin-top: 5vh;
    font-size: 32px;
    color: #000;
}

.index-section-flexbox img {
    width: 100%;
    border-radius: 50px;
    max-height: 70vh;
    
}

.index-section-flexbox p {
    margin: 2vh;
    width:90%;
    font-size: 18px;
    font-weight: 100;
}

.index-section-flexbox a{
    padding: 1.5vh 4vh 1.5vh 4vh;
    margin-bottom:2vh;
    margin-right: 5%;
    margin-top: -20px;
    background: #F6F6F6;
    color: #000;
    text-decoration: none;
    align-self: end;
    border-radius: 10px;
    font-weight: bold
}

@media (max-width: 1024px) {

}

            /* Konto */
/*--------------------------------------------------*/

#account-info{
    border: 0px;
    border-radius:20px;
    height: 60%;
    padding: 2rem;
    background: #3717D3;
    width: 60%;
    margin-top:4rem;
}

#account-info input{
    height: 10%;
    border-radius: 10px;
    font-size: 24px;
    border: 0px;
    color: #000;
    width: 100%;
    margin-bottom: 2rem;
    padding: 1rem;
}

#account-info form {
   display: flex;
   flex-direction: column;
    height: 40%;
}

#account-info form button{
    background: #F6F6F6;
    width: 100%;
    height: 10%;
    border: 0px;
    font-size: 24px;
    border-radius: 10px;
    color: #000;
    margin-top: 1rem;
    padding:1rem;
}


.account-delete-form button{
    background-color: red;
    color: white;
    border: none; 
    border-radius: 15px; 
    cursor: pointer; 
    font-size: 16px; 
    font-weight: bold; 
    height: 7vh;
    width: 15vw;
    margin-top:3rem;
}

#account-page{
    display: flex;
    flex-direction: column;
    align-items: center;    
    justify-content: space-evenly;

}

#account-info h2{
    text-align: center;
}

#my-submissions{
    margin-top: 10vh;
    width: 60%;
    padding: 2rem;
    background: #E9EEF1;
    border-radius: 10px;
    margin-bottom: 4rem
}

#my-submissions *{
    color: #000;
    text-align: center;
}

#my-submissions h2{
    margin-bottom: 2rem;
}

#my-submissions table{
    border: 1px solid #000;
    background-color: #fff;
    width: 100%;
}
#my-submissions table thead tr th, #my-submissions table tbody tr td{
    border: 1px solid #000;
    padding: 0.5rem 1rem;
    text-align: center;
}

            /* Kurser */
/*--------------------------------------------------*/

.main-courses {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
}

.main-courses h2{
    color: #000;
}

.course-box details summary {       
    background: #3717D3; 
    width: 70vw; 
    max-width: 800px;
    height: 100px;
    margin-top:5vh;
    border-radius: 10px; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    transform: translateY(-3px); 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15); 
    font-size: 24px;
}

.course-box details summary:hover {
    background: #2E0FB5; 
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); 
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease; 
}



.course-box details ul li{
    list-style: none; 
    width: 100%;
}
.course-box details ul li a {
    font-size: 18px;
    font-weight: 700;
    background: #E9EEF1; 
    width: 100%; 
    height: 80px;  
    border-radius: 10px;
    display: flex;
    align-items: center;
    font-weight: normal;
    color: #000; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-bottom: 1px solid grey;
    margin:2px;
    padding-left: 1rem;

}

.course-box details ul li:hover {
    transform: translateY(-3px); 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15); 
}

.course-box details[open] ul {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 1024px) {

}

           /* uppgifter */
/*--------------------------------------------------*/

#assignment-page{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.assignment-detail-student{
    margin: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60vw;
    background: #E9EEF1;
    min-height: 60vh;
    border-radius: 25px;
}

.assignment-detail-student h3{
    margin-top: 2rem;
    color:#000;
}

.assignment-detail-student h2{
    margin-top: 1rem;
    color:#000;
}

.assignment-detail-student img{
    width: 80%;
    max-height: 60vh;
    border-radius: 25px;
    margin: 1rem;
}
.assignment-detail-student p{
    background: #fff;
    width: 80%;
    padding: 1rem;
    border-radius: 25px;
    border: 2px solid #000;
    margin:1rem;
    color:black;
}

#student-assignment-desc{
    width: 100%;
    display: flex;
    justify-content: center;
}
.answer-section, .answer-section form{
     display: flex;
     align-items: center;
    flex-direction: column;
    width: 100%;
}

.answer-section form button{
    background: #3717D3;
    padding: 1rem 5rem;
    color: #fff;
    align-self: flex-end;
    border-radius: 10px;
    align-self: center;
    cursor: pointer;
}

.answer-section form{
    width: 100%;
    margin-bottom: 2rem;
}

.answer-section h3{
    color: #000;
}
#answer-text{
    background: #fff;
    width: 80%;
    padding: 1rem;
    border-radius: 25px;
    border: 2px solid #000;
    margin: 1rem;
    color:#000;
}

#answer-form textarea{
    width: 80%;
    height: 150px;
    border-radius: 10px;
    border: 2px solid #000;
    padding: 1rem;
    margin-top: 1rem;
    color: #000;
    font-size: 1rem;
}

#answer-form button{
    margin-top: 1rem;
}

#ai-helper {
    position: fixed;
    top: 25%; 
    right: 0; 
    width: 10vw; 
    height: 50%; 
    border: 1px solid #696969;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    padding: 20px; 
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1); 
    z-index: 1000; 
}

#ai-helper h3 {
    margin-bottom: 1rem; 
    font-size: 18px;
    text-align: center;
    color: #000; 
    overflow-y: hidden;
}

#chat-container {
    border: 1px solid #ccc;
    padding: 10px;
    max-width: 100%;
    height:30vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 5px;

}

#chat-messages p {
    color: #000; 
}


#ai-helper form {
    margin-top: 10px;
    width: 100%;
    
}

#ai-helper input{
    width: 100%; 
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    color: #000; 
}

#ai-helper, #ai-helper * {
    color: #000; 
    
}

#chat-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#chat-form label{
    overflow-y: hidden;
}

#chat-form input{
    width: 80%;
    border: 1px solid #000;
    overflow-y: hidden;
}
#chat-form button {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    background: #2E0FB5;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    overflow-y: hidden;

}

#ai-helper button:hover {
    background: #1A0D99;
}

@media (max-width: 1440px ) and (min-width: 1024px) {
    #ai-helper {
        width: 8vw; 
    }
}

@media (max-width: 1024px) {

}

          /* Admin */
/*--------------------------------------------------*/

#admin-page *{
    color: #000;
    border:0px;
}

#admin-page{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#admin-page section{
    margin: 2rem;
}

#create-category, #create-assignment, #create-user, #all-users{
    background: #3717D3;
    border: 0px;
    border-radius: 10px;
    padding: 1rem 2rem;
    font-size: 18px;
    width: 50%;
}

#create-category *, #create-assignment *, #create-user *{
    color: #fff;
}

#create-category h2, #create-assignment h2, #create-user h2{
    text-align: center;
}

#create-category form{
   display: flex;
   flex-direction: column;
}

#create-category form input{
   margin-bottom: 1rem;
   padding: 1rem; 
   color:#000;
   font-size: 24px;
   border-radius: 10px;
}

#create-category form button{
   width:30%;
   align-self: center;
   color: #000;
   padding:0.5rem;
    font-size:18px;
    border-radius: 10px;
}

#create-assignment form, #create-user form, #create-assignment form select{
    display: flex;
    flex-direction: column;
}

#create-assignment form input, #create-assignment form textarea, #create-assignment form button, #create-user form button, #create-user form input, #create-user form select, #create-user form select *, #create-assignment form select, #create-assignment form select *{
    margin-bottom: 1rem;
    padding: 1rem; 
    color:#000;
    font-size: 24px;
    border-radius: 10px;
}

#create-assignment form textarea{
    padding: 0;
    max-height: fit-content;
}
#assign-cat{
    width: 20%;
    height: 3rem;
    border-style: none;
    margin-bottom: 1rem;
    color: #000;
    text-align: center;
    border-radius: 10px;
}

#assign-cat option{
    color: #000;
}
#all-users{
    background-color: #E9EEF1;
}

#all-users{
    text-align: center;
}
#users-table{
    width: 100%;
    border-collapse: collapse;
}

#users-table-head tr, #users-table-body tr {
    width: 100%;
    
}

#users-table-head tr th, #users-table-body tr td{
    padding: 1rem;
    color: #000;
    max-width: 50%;
    background-color: #F6F6F6;
    text-align: center;
    border: 1px solid #000;
}

#role-change select{
    background: #3717D3;
    border-radius: 10px;
    font-size: 18px;
    color: #fff;
}

#role-change select option{
    color: #fff;
}

#password-change *{
    height: 2rem; 

}

#password-change {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#admin-delete-user button{
    background: red;
    border-radius: 10px;
    font-size: 18px;
    color: #fff;
    border: 0px;
}

#role-change select, #admin-delete-user button{
    padding:0.5rem 1rem;
    text-align: center;

}

            /* Lärarpanel - Dashboard */
/*--------------------------------------------------*/

#teacher-dashboard *{
    color: #fff;
}

#teacher-dashboard-h2{
    text-align: center;
    color: #000;
    margin-top:2rem;
    font-size: 32px;
}
.category-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
}

.category-item a {       
    background: #3717D3; 
    width: 70vw; 
    max-width: 800px;
    height: 100px;
    margin-top:5vh;
    border-radius: 10px; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    text-decoration: none;
}


            /* Lärarpanel - Uppgifter */
/*--------------------------------------------------*/

#teacher-create-assignment{
    background: #3717D3;
    border: 0px;
    border-radius: 10px;
    padding: 1rem 2rem;
    font-size: 18px;
    width: 50%;
    margin-top: 4rem;
}

#teacher-create-assignment *{
    color: #fff;
}

#assign-clues{
    color: #000;
    font-size: 18px;
} 
#teacher-create-assignment h2, #teacher-assignments h2{
    text-align: center;
}

#teacher-create-assignment form{
   display: flex;
   flex-direction: column;
}

#teacher-create-assignment form input, #teacher-create-assignment form textarea{
   margin-bottom: 1rem;
   padding: 1rem; 
   color:#000;
   font-size: 24px;
   border-radius: 10px;
}

#assign-image{
    border: 2px solid #fff;
    border-radius: 10px;
    padding: 1rem;
    color: #000;
    font-size: 18px;
    background-color: #fff;
}

#teacher-create-assignment form button{
   width:100%;
   align-self: center;
   color: #000;
   padding:1rem;
    font-size:18px;
    border-radius: 10px;
    margin:1rem;
}

#teacher-create-assignment form{
    display: flex;
    flex-direction: column;
}

#teacher-create-assignment form textarea{
    padding: 1rem;
}

#teacher-assignments{
    width: 50%;
    padding:1rem 2rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
}

#teacher-assignments h2{
    text-align: center;
    color: #000;
}

#teacher-assignments ul li a {
    font-size: 18px;
    font-weight: 700;
    background: #E9EEF1; 
    width: 100%; 
    height: 80px;  
    border-radius: 10px;
    display: flex;
    align-items: center;
    font-weight: normal;
    color: #000;
    border-bottom: 1px solid grey;
    padding-left: 1rem;

}


#teacher-category-page{
    display: flex;
    flex-direction: column;
    align-items: center;
}
            /* Lärarpanel - Kategori */
/*--------------------------------------------------*/

#teacher-assignment-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    border-radius: 25px;
}

#assignment-info *{
    color: #000;
}

#assignment-info p{
    color:#000;
    padding: 1rem;
}

#assignment-info h3{
    margin-left: 1rem;
}

#assignment-info{
    margin-top: 10vh;
    background: #E9EEF1;
    border: 0px;
    border-radius: 10px;
    padding: 1rem 2rem;
    font-size: 18px;
    width: 70%;
}

#assignment-info h2{
    text-align: center;
}

#submissions{
    margin-top: 10vh;
    width: 70%;
    padding: 2rem;
    background: #E9EEF1;
    border-radius: 10px;
}

#submissions *{
    color:#000;
}

#submissions-table tbody tr td{
    padding: 0.5rem 1rem;
    text-align: center;
}

#submissions-table thead tr th, #submissions-table tbody tr td{
    border: 1px solid #000;
    background: #F6F6F6;
}
#grading{
    height: 3vh;
    border-radius: 4px;
}