/* Root Variables */
:root {
  /* colours */
  /* white */
  --white-0: rgb(255,255,255);
  --white-1: rgb(220,220,220);
  --white-2: rgb(180,180,180);
  --white-3: rgb(130,130,130);
  --white-4: rgba(110,110,110);

  /* grey */
  --grey-0: rgb(50,50,50);
  --grey-1: rgb(60,60,60);
  --grey-2: rgb(80,80,80);
  --grey-3: rgb(164, 150, 150);
  --grey-4: rgb(95, 95, 95);
  --grey-5: rgb(100, 100, 100);
  /* black */
  --black-0: rgba(40, 40, 40, 80);
  --black-1: rgba(40, 40, 40, 50);
  --black-2: rgba(40, 40, 40, 20);
  
  /* red */
  --red-0:rgb(255, 0, 0);
  --red-1:rgb(210, 4, 45);
  --red-2: rgb(139, 0, 0);
  
  /* yellow */
  --yellow-0:rgb(243, 239, 148);
  --yellow-1:rgb(242, 202, 72);

  /* green */
  --green-0: #16B3C9;
  --green-1: rgb(17 144 163);
  --green-2: rgb(14 109 124);
  --green-3: #09de50;
  --green-4: #199843;
  
  /* blue */
  --blue-0: #2979c8;
  --blue-1: rgb(17, 24, 163);
  --blue-2: rgb(11, 7, 81);   
    
  /* purple */
  --purple-purp: rgb(106 88 175);
  --purple-pink: rgb(210, 44, 194);
  --purple-dark: rgb(126, 36, 136);

  /* shadows */
  /* light */
  --shadow-light-0: drop-shadow(2px 2px 8px var(--grey-1));
  --shadow-light-1: drop-shadow(2px 2px 8px var(--grey-2));

  /* dark */
  --shadow-dark-0: drop-shadow(1px 1px 4px var(--black-1));
  --shadow-dark-1: drop-shadow(1px 1px 4px var(--black-2));

  /* fonts */
  --font-weight-300: 300;
  --font-weight-400: 400;
  --font-weight-500: 500;
  --font-weight-600: 600;
  --font-weight-700: 700;
  --font-weight-800: 800;
  --font-weight-900: 900;

  /* radius */
  --radius-xl: 2.4rem;
  --radius-lg: 1.2rem;
  --radius-md: 0.8rem;
  --radius-sm: 0.4rem;
  --radius-mm: 0.2rem;

}
*, 
*::before,
*::after{
  box-sizing: border-box;
}
/* h1{
  margin:0;
} */

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: var(--grey-0);
  color:var(--white-1);
  height: 100vh;
  overflow: hidden;
}

/* Containers */
.login-container,
.container,
.xpBoardContainer {
  background: var(--black-0);
  border: 1px solid var(--black-2);
  border-radius: var(--radius-md);
  box-shadow: 0 0 10px var( --shadow-dark-0);
}

.login-container {
  max-width: 600px;
  margin:0 auto;
  padding: 0 0.1rem;
  margin-top:150px;
  text-align: center;
  align-items: left;
}

/* Form Styles */
form {
  margin:0 auto; 
  display: flex;
  flex-direction: column;
  border: 1px solid var(--black-0);
  align-items: center;
  
}

input[type="text"],
input[type="password"] {
  width: 80%;
  height: 35px;
  margin-bottom: 10px;
  padding: 5px;
  padding-left: 10px;
  border: 1px solid var(--grey-1);
  border-radius: var(--radius-sm);
  background-color: var(--grey-2);
  font-size: 16px;
  color: var(--white-1);
}

input::placeholder {
  font-size: 16px;
  color: var(--white-2);
} 


/* Button Styles */
button {
  width: 80%;
  padding: 10px;
  border:1px sold var(--black-2);
  border-radius: var(--radius-sm);
  background: var(--green-1);
  color: var(--white-1);
  cursor: pointer;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;  /* when uppercase put some space between letter look better*/
}

button:hover {
  background: var(--green-2);
}

/* Error Message */
.error-message {
  color: var(--red-1);;
  margin-top: 10px;
}

.remember-me-container {
  display: flex;
  align-items: center;
  width: 80%;
  margin-top: 10px;
}

.remember-me-container input {
  width: auto; /* This will allow the checkbox to have its default size */
  margin: 0; /* Remove default margin */
  margin-right: 10px; /* Space between checkbox and label */
}

.remember-me-container label {
  margin: 0; /* Remove default margin */
  font-size: 16px; /* Match the font size of the other inputs for consistency */
}

.container {
  display:grid;
  grid-template-columns: 284px 1fr;
  grid-template-rows: 50px 1fr 1fr;
  grid-template-areas: 
  "sideBar header"
  "sideBar topSection"
  "sideBar bottomSection";
  width: 100%;
  height: 100vh;
  overflow: auto;
}

/* left-section */
.left-section {
  grid-area: sideBar;
  position: absolute;  /* stop left-section rolling with right side */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  margin: 1rem;
 /*  background: var(--grey-1);
  border-radius: var(--radius-md);
  box-shadow: 0 0 10px var( --shadow-dark-0); */
  height: calc(100vh - 16px);
  width:254px; 
}


.card-user{
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: none;
  height:auto;
  font-size: 1.4rem;
  line-height: 1.5;
}
.card-user .list-item{
  font-size: 1.2rem;
}

#userImage{
  display: block;
  align-items: center;
  margin: 0 auto;
  width: 90%;
  height: auto;
}

.logout-button{
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 1px;  /* when uppercase put some space between letter look better*/
  margin-bottom: 0.8rem;
  padding: 0.4rem 0.8rem;
  align-self: center;
}
/* end of left section*/
.logout-button2{
  display: none;
}
 

/* Header and Dashboard Section */
.header {
  display: flex;
  justify-content: space-between;
  grid-area: header;
  height: 50px;
  width: 100%;
  padding: 0;
  margin: auto;
}

/* Container for top section */ /*try use grid*/
.dashboard-top {
  grid-area: topSection;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas: 
  "xpInfo OnProgress radarChart"
  "auditInfo OnProgress radarChart";
  justify-content: center;
  margin:0 auto;
  width: 100%;
}
.xp-info{
  position: relative;
  grid-area: xpInfo;
  line-height: 1.5;
  margin: 10px 10px 10px 20px;
}

.link-more {
  position: absolute;
  text-decoration: none;
  top: 10px;
  right: 20px;
  font-size: 1.4rem;
  color: var(--white-2);
  cursor: pointer;
  transition: all 0.2s;

  
}
.link-more:hover{
  color: var(--white-4);
  padding-bottom: 1px;
  border-bottom: 1px solid var(--white-4);
}

.more-icon{
  font-size: 1.4rem;
  color: var(--white-2);
}

.link-more:hover .more-icon {  
  color: var(--white-4); /*icon also need to change color */
  transform: translateX(3px); /* let the icon move to right a bit*/
}

.more-icon:hover{
  font-size: 1.4rem;
  color: var(--white-4);
}

/* By default, hide the <br> element */
.break-on-small {
  display: none;
}

.xp-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.xp-overlay-content {
  position: relative;
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  width: 80%;
  max-height: 80%;
  overflow-y: auto;
}

/* Style for the list items in the overlay */
#allProjectList li {
  margin-bottom: 10px; /* Adjust this value to control the space between items */
  padding: 5px; /* Optional: Add padding for better visual spacing */
}

.project-name {
  font-weight: bold; /* Make project name bold */
  margin-bottom: 5px; 
}


.finished-date {
  font-size: 1.4rem;
  color: var(--white-2)
}

.project-repo-link {
  font-size: 1.2rem;
  color: var(--purple-pink); /* Adjust as needed */
  text-decoration: none;
  transition: all 0.3s;
}

.project-repo-link:hover {
  color: var(--purple-dark); 
  text-decoration: underline;
}

.project-repo-link:hover .fa-angle-right {
  transform: translateX(3px); /* let the icon move to right a bit*/
}

.fa-angle-right {
  margin-left: 5px;
}

.audit-info{
  grid-area: auditInfo;
  font-size: 1.6rem;
  margin: 10px 10px 10px 20px;
}
.OnProgress{
  grid-area: OnProgress;
  margin: 10px;
}
.working-count,
.finished-count{
  font-weight: var(--font-weight-700);
}

.working-count,
.finished-count {
  text-decoration: underline;
  color:var(--green-3);
  transition: all 0.3s;
}

.working-count:hover,
.finished-count:hover {
  cursor: pointer;
  color:var(--green-4);
}

.overlay {
  display: none; 
  position: fixed; 
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Black background with transparency */
  border-radius:var(--radius-mm);
  z-index: 1500; 
}

.overlay-content {
  position: relative;
  margin: auto;
  padding: 20px;
  max-width: 90vw; 
  max-height: 90vh; 
  max-width: 500px;
  overflow-y: auto; 
  overflow-x: hidden;
}

.overlay-content p, 
.overlay-content li,
.xp-overlay-content p,
.xp-overlay-content li{
  line-height: 1.6; 
}

/* Style for the disabled state of the overlay */
.disabled {
  color:var(--white-0);
  pointer-events: none; /* Disable all mouse events */
  cursor: not-allowed; /* Show a not-allowed cursor */
  text-decoration: none;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
}

.radarChart{
  grid-area: radarChart;
  margin: 10px 20px 10px 10px;
}

.radarChart-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between; 
  column-gap: 50px;
  align-items: baseline; 
  margin: 0;
  padding: 0.5rem;
}
.radarChart-header h1 {
  display: block;
  margin: 0;
  padding: 0.8rem;
}
.level{
  margin-left: 0.8rem;
}

.dashboard-bottom{
  grid-area: bottomSection;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: 
  "lineChart barChart";
}

.lineChart{
  grid-area: lineChart;
  margin: 10px 10px 20px 20px;
}

.barChart{
  grid-area: barChart;
  margin: 10px 20px 20px 10px;
}

/* Right section card */
#radarChartContainer {
  display: flex;
  flex-direction: column;
  text-align: left;
  align-items: center;
}


#radarChart {
  width: 95%;
  height: auto;
}

/* audit-ratio card*/
.arrow-svg-container{
  width:100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
 }
 
 .ratio-status,
 .audit-content-container{
  width:100%;
  display: flex;
  flex-direction: row;
  align-items: end;
 }
 
 #status{
  font-size: 1.5rem; /* Adjust as needed to match the size of the ratio text */
  margin-left:1.5rem
 }
 
 .audit-left,
 .audit-right,
 .audit-content{
  flex:1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
 }
 
 .audit-left{
  width: 100%;
 }
 
 .svg-container {
  width: 100%;
  height: 100%; 
  margin-bottom: 0.1rem;
  }
  
  #done-svg,
  #received-svg{
    width: 100%;
  }
/* end of audit-info*/

.card{
  background: var(--grey-0);
  border-radius: var(--radius-md);
  box-shadow: 0 0 10px var( --shadow-dark-0);
  padding: 20px;
  text-align: left;
  align-items: center;
  font-size: 1.4rem;
} 


.card h2 {
  margin-bottom: 20px;
  color: #ddd;
}

/* SVG and Media Query */
#barChart,
#lineChart {
  width: 100%;
  min-height:30rem; 
}  
#up-arraw,
#down-arraw{
  margin-left: 0.2rem;
}

/* without showing list dot in front*/
#user-info,
#audit-info {
  list-style-type: none;
}

.line {
  fill: none;
  stroke: var(--green-0);
  stroke-width: 2px;
}

.lebel{
  color: var(--white-0);
}

.chart-header{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin: 0;
  vertical-align: bottom;
}

.selection-label{
  margin-left: 3rem;
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  font-size: 0.5rem;
}

.graph-display-name{
  border-radius: var(--radius-mm);
  background: var(--white-3);
  color: var(--grey-0);
  width: fit-content;
  height: fit-content;
  justify-self: end;
  font-size: 1.4rem;
}

.rect { 
  transition: 0.3s;
 }
 
.rect:hover { 
  opacity: 0.5;
 }
 
 svg {
    width: auto;
    height: auto;
 }
 

/* font or other styles*/
.bb-01{
  border-bottom: solid 1px rgba(255, 255, 255, 0.15);
}

/*font size */
.f-md{
/*   font-size: 4rem; */
font-size: 4vw;
  line-height: 0.9;
  color: var(--yellow-1);
}
.f-md2{
 /*  font-size: 2rem; */
  font-size: 2vw;
  line-height: 0.9;
}
.f-ms25{
  font-size: 2rem;
}

.f-ms12{
  font-size: 1.2rem;
}
.f-ms18{
  font-size: 2rem;
  line-height: 0.9;
  color:var(--white-0);
}
.f-ms14{
  font-size: 1.4rem;

}
/*font color */
.f-cw{
  color:var(--white-0);
}

.f-cw2{
  color:var(--white-2);
}

.f-cpp{
  color:var(--purple-pink);
}
.f-cb{
  color:var(--blue-0)
}

.f-cy{
  color: var(--yellow-1);
}

.f-cg2{
  color:var(--green-2)
}

.f-cg3{
  color:var(--green-3)
}


@media (max-width: 1500px) {
  
  .container{
    grid-template-columns: 1fr;
    grid-template-areas: 
    "header"
    "left-section"
    "dashboard-top"
    "dashboard-bottom";
  }
  
  /* Header and Dashboard Section */
  .header {
    display: flex;
    justify-content: space-between;
    grid-area: header;
    height: 50px;
    width: 100%;
    padding: 0;
    margin: auto;
  }
  .header h1{
    font-size: 4vw;
    line-height: normal;
    margin: 0 20px;
    align-items: center;
  }
  
  .left-section {
    position: relative; /*cancel the abslute*/
    grid-area: left-section;
    display: flex;
    flex-direction: row;
    width: auto;
    height: fit-content;
    box-sizing: border-box;
    background: var(--grey-0);
    border-radius: var(--radius-md);
    box-shadow: 0 0 10px var( --shadow-dark-0);
    padding: 16px;
    margin: 20px 20px 10px 20px;
  }
  .card-user{
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center; /* Center the image and name vertically */
    margin:20px auto;
  }
  .card-user .list-item{
    font-size: 1.18rem;
    align-self:first center;
  }

  .user-header {
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the image and name vertically */
    justify-content: center;
    vertical-align: top;
  }
  #userImage {
    width:50%;
    height:50%;
    border-radius: 50%;
  }
  .logout-button{
    display: none;
  }
   
  .logout-button2{
    display: block;
   align-self: center;
   margin-right: 1.5rem;
   margin-top: 1rem; 
   padding: 0.4rem 0.8rem;
   font-size: 1rem;
   letter-spacing: 1px;
  }
  .dashboard-top{
    grid-area: dashboard-top;
    display: grid;
    grid-template-columns: 2fr 3fr;
    grid-template-areas: 
    "xpInfo radarChart"
    "auditInfo radarChart"
    "OnProgress radarChart";
  }
  
  .xp-info{
    grid-area: xpInfo;
    height: fit-content;
    margin: 10px 10px 10px 20px;
  }
  .audit-info{
    grid-area: auditInfo;
    height: fit-content;
    margin: 10px 10px 10px 20px;
  }
  .OnProgress{
    grid-area: OnProgress;
    font-size: 1.4rem;
    margin: 10px 10px 10px 20px;
  }  
  .radarChart{
    grid-area: radarChart;
    margin: 10px 20px 10px 10px;
  }
  
  .dashboard-bottom{
    grid-area: dashboard-bottom;
    display:grid;
    grid-template-columns: 1fr;
    grid-template-areas: 
    "lineChart" 
    "barChart";
    column-gap: 0.16rem;
  }
  
  .lineChart{
    grid-area: lineChart;
    margin: 10px 20px;
  }
  .barChart{
    grid-area: barChart;
    margin: 10px 20px 20px 20px;
  }
}

 @media (max-width: 1150px) {
  .container{
    grid-template-columns: 1fr;
    grid-template-areas: 
    "header"
    "left-section"
    "dashboard-top"
    "dashboard-bottom";
  }
   
    /* Header and Dashboard Section */
  .header {
    display: flex;
    justify-content: space-between;
    grid-area: header;
    height: auto;
    width: 100%;
    padding: 0;
    margin: auto;
  }
  .header h1{
    font-size: 4vw;
    line-height: normal;
    margin: 0 20px;
    align-items: center;
  }
    
  .left-section {
    position: relative; /*cancel the abslute*/
    grid-area: left-section;
    display: flex;
    flex-direction: row;
    width: auto;
    height: fit-content;
    box-sizing: border-box;
    background: var(--grey-0);
    border-radius: var(--radius-md);
    box-shadow: 0 0 10px var( --shadow-dark-0);
    padding: 16px;
    margin: 20px 20px 10px 20px;
  }
  .card-user{
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center; /* Center the image and name vertically */
    margin:20px auto;
  }
  .card-user .list-item{
    font-size: 1.18rem;
    align-self:first center;
  }

  .user-header {
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the image and name vertically */
    justify-content: center;
    vertical-align: top;
  }
  #userImage {
    width:50%;
    height:50%;
    border-radius: 50%;
  }
  .logout-button{
    display: none;
  }
   
  .logout-button2{
   display: block;
   align-self: center;
   margin-right: 1.5rem;
   margin-top: 1rem; 
   padding: 0.4rem 0.8rem; 
   font-size: 1rem;
   letter-spacing: 1px;
  }
  
   .dashboard-top{
     grid-area: dashboard-top;
     display: grid;
     grid-template-columns: 3fr 2fr;
     grid-template-areas: 
     "xpInfo OnProgress"
     "auditInfo OnProgress"
     "radarChart radarChart";
     
   }
   
   .xp-info{
     grid-area: xpInfo;
     height: fit-content;
     margin:10px 10px 10px 20px ;
   }
   .audit-info{
     grid-area: auditInfo;
     height: fit-content;
     margin:10px 10px 10px 20px ;
   }
   .OnProgress{
     grid-area: OnProgress;
     font-size: 1.4rem;
     margin:10px 20px 10px 10px ;
   }  
   .radarChart{
     grid-area: radarChart;
     margin:10px 20px;
   }
   
   .f-md2{
    font-size: 4vw;
  }
  .f-md{
    font-size: 6vw;
  }
   
   .dashboard-bottom{
     grid-area: dashboard-bottom;
     display:grid;
     grid-template-columns: 1fr;
     grid-template-areas: 
     "lineChart" 
     "barChart";
     column-gap: 0.16rem;
   }
   
   .lineChart{
    grid-area: lineChart;
    margin:10px 20px;
  }
  .barChart{
    grid-area: barChart;
    margin:10px 20px 20px 20px;
  }
 
 }
 
/* mobile */
@media (max-width: 700px) {
  .container{
    grid-template-columns: 1fr;
    grid-template-areas: 
    "header"
    "left-section"
    "dashboard-top"
    "dashboard-bottom";
  }
   
    /* Header and Dashboard Section */
  .header {
    display: flex;
    justify-content: space-between;
    grid-area: header;
    height: auto;
    width: 100%;
    padding: 0;
    margin: auto;
  }
  .header h1{
    font-size: 5vw;
    line-height: normal;
    margin: 0 20px;
    align-items: center;
  }
    
  .left-section {
    position: relative; /*cancel the abslute*/
    grid-area: left-section;
    display: flex;
    flex-direction: row;
    width: auto;
    height: fit-content;
    box-sizing: border-box;
    background: var(--grey-0);
    border-radius: var(--radius-md);
    box-shadow: 0 0 10px var( --shadow-dark-0);
    padding: 16px;
    margin-left: 16px;
  }
  
  .card{
    margin:10px 20px;
   }
   
  .card-user{
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center; /* Center the image and name vertically */
    margin:20px auto;
    
    @media(max-width: 375px){
      flex-direction: column;      
    }
  }
  .card-user .list-item{
    font-size: 1.18rem;
    align-self:first center;
  }

  .user-header {
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the image and name vertically */
    justify-content: center;
    vertical-align: top;
    @media(max-width: 375px){
      flex-direction: row;
      justify-content: space-between;
      align-self: flex-start;
    }
  }
  #userImage {
    width:50%;
    height:50%;
    border-radius: 50%;
    @media(max-width: 375px){
      width:45px;
      height:45px;
      margin-right: 20px;
      border-radius: 0;
    }
  }
  .logout-button{
    display: none;
  }
   
  .logout-button2{
    display: block;
   align-self: center;
   margin-right: 0.8rem;
   margin-top: 0.8rem; 
   padding: 0.4rem;
   letter-spacing: 1px;
   width: 100%;
   box-sizing: border-box;
    @media(max-width: 375px){
      width: auto;    
      margin-right: 0.4rem;
      margin-top: 0.4rem; 
      padding: auto;
    }
  }
  .header h1{
    font-size: 5vw;
    line-height: normal;
    margin: 0 20px;
    align-items: center;
  }
 
  .dashboard-top{
    grid-area: dashboard-top;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: 
    "xpInfo"
    "auditInfo" 
    "OnProgress"
    "radarChart";
  }
  
  .xp-info{
    grid-area: xpInfo;
    height: fit-content;
  }
  
  .break-on-small {
    display: inline;  /*add <br> */
  }
  
  .project-name,
  .finished-date,
  .group-count{
    font-size: 1.2rem;
  }
    
  #project-list {
    font-size: 1.1rem;
  }
  .f-md2{
    font-size: 4vw;
  }
  .f-md{
    font-size: 6vw;
  }
  .audit-info{
    grid-area: auditInfo;
    height: fit-content;
  }
  .OnProgress{
    grid-area: OnProgress;
   
  }  
  .radarChart{
    grid-area: radarChart;
  }
  
  .dashboard-bottom{
    grid-area: dashboard-bottom;
    display:grid;
    grid-template-columns: 1fr;
    grid-template-areas: 
    "lineChart" 
    "barChart";
  }
  .lineChart{
    grid-area: lineChart;
  }
  .barChart{
    grid-area: barChart;
    margin: 10px 20px 20px 20px;
  }
    .chart-header {
    flex-direction: column;
  }
  .graph-display-name{
    width: auto;
 }  

  #barChart .tick text {
    font-size: 12px !important;
  }
}


/*add mouse movement affect*/
.container .grid{
  position: relative;
}
.container {
 
  & .grid {
    &:hover {
      background-attachment: fixed;
      background-image: radial-gradient(
              circle at var(--x, 0) var(--y, 0),
              hsl(0 0% 1% / 0.25),
              hsl(0 0% 1% / 0.0125) 10rem)
    }
  }
};