@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap');

/*
Rough order of style stuff:
1. High level element styling
2. Header bar/persistent styling
3. Student-side styling, roughly big to small
4. Admin-side styling, roughly big to small
5. Sort interface styling, roughly big to small
Then random
*/

/* 1. High level element styling */
html {
  text-align: center;
  font-family: Verdana, sans-serif;
  font-size: 18px;
  --green: #1b603a;
  --light-green: #76bd22;
  --orange: #e14504;
  --blue: #00a1e0;
  --pink: #e60895;
  --dark-blue: #003a5d;
  --maroon: #72253d;
}

body {
  display: block;
  margin: 60px 0 0 0;
}

h1 {
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 70px;
  font-family: Montserrat, sans-serif;
  color: var(--green);
}

header {
  padding: 5px 10px;
  width: calc(100% - 20px);
  height: 40px;
  position: fixed;
  top: 0;
  left: 0;
  background-color: white;
  border-bottom: 3px solid var(--light-green);
  box-shadow: var(--light-green) 0 0 20px -5px;
}


footer {
  position: relative;
  bottom: 0;
}

main {
  min-height: calc(100vh - 100px);
}

/* 2. Header bar/persistent styling */
img {
  height: 40px;
  float: left;
  margin-right: 10px;
}

#header-message {
  float: left;
  height: 40px;
  line-height: 40px;
}

#google-wrapper {
  float: right;
  /* Magic number */
  width: 227px;
}

#logout {
  padding: 8px 20px;
  border-radius: 5px;
  font-size: 18px;
  background-color: var(--green);
  color: white;
  font-family: Montserrat, sans-serif;
  margin: auto;
  border: none;
  /*Assuming no log in*/
  display: none;
  cursor: pointer;
  float: right;
}

/* 3. Student-side styling, roughly big to small */
#student-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

/* All possible activity button options */
.isRanked, .isNotRanked, .cannotSelect {
  flex-basis: 300px;
  padding: 20px;
  font-size: 20px;
  border-radius: 10px;
  border: 2px solid var(--green);
  margin: 20px;
  cursor: pointer;
}

.isRanked {
  box-shadow: var(--green) 0 0 5px 0;
}

.cannotSelect {
  border-color: grey;
  color: grey;
  text-decoration: line-through;
}

.isNotRanked {
  box-shadow: var(--green) 0 0 10px -5px;
}

/* Grey outline/number itself */
.rank {
  width: 50px;
  height: 50px;
  font-size: 40px;
  font-family: Montserrat, sans-serif;
  float: left;
}

.isNotRanked .rank {
  border: 2px dashed grey;
}

.isRanked .rank {
  border: 2px solid var(--green);
  background-color: var(--green);
  color: white;
}

.cannotSelect .rank {
  border: 2px solid grey;
}

#student-submit {
  padding: 15px 25px;
  border-radius: 10px;
  font-size: 24px;
  background-color: var(--green);
  color: white;
  font-family: Montserrat, sans-serif;
  margin: auto;
  border: none;
}

/* 4. Admin-side styling, roughly big to small */
#admin {
  height: 100%;
  padding: 5px;
}

.sidebar {
  height: calc(100vh - 53px);
  width: 260px;
  background-color: #ddd;
  float: right;
  position: fixed;
  top: 53px;
  right: 0;
  padding: 10px;
}

.admin h1, #admin-activity-wrapper {
  width: calc(100vw - 300px - 10px);
}

#admin-activity-wrapper {
  display: flex;
  flex-wrap: wrap;
}

.admin h1 {
  font-size: 30px;
}

.admin #message {
  margin: 0;
}

button {
  background-color: grey;
  color: white;
  padding: 8px;
  border-radius: 5px;
  cursor: pointer;
  border: none;
  font-size: 20px;
  font-family: Montserrat;
}

button:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.sidebar button {
  margin: 5px;
  width: 200px;
}

#activity-add, #activity-submit {
  background-color: var(--blue);
}

#view-student {
  background-color: var(--light-green);
}

#admin-about {
  background-color: var(--orange);
}

#draw-sort {
  background-color: var(--pink);
}

.admin-choice {
  padding: 5px;
  border: 2px solid var(--green);
  border-radius: 5px;
  margin-bottom: 10px;
  flex-basis: 500px;
  margin: 5px;
  flex-grow: 1;
  text-align: left;
  box-shadow: var(--green) 0 0 10px -5px;
}

.admin-choice-name {
  width: calc(100% - 100px);
  font-family: Montserrat, sans-serif;
  font-size: 24px;
}

.admin-choice-id {
  color: grey;
}

.admin-choice-delete {
  color: var(--orange);
  text-decoration: underline;
  cursor: pointer;
}

.admin-choice-grade {
  font-family: Montserrat, sans-serif;
  font-size: 26px;
  height: calc(100%);
  line-height: 0.85;
  float: right;
  color: var(--blue);
  text-align: right;
}

.admin-choice-more {
  margin-top: 30px;
  background-color: white;
  border: 2px solid var(--green);
  color: var(--green);
}

/* 5. Sort interface styling, roughly big to small */
#sort {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
}

#sort-tagline {
  margin-top: 70px;
}
#sort-wrapper {
  display: flex;
  flex-wrap: wrap;
}

.sort-activity {
flex-basis: 300px;
flex-grow: 0; 
padding: 20px;
margin: 5px;
border-radius: 10px;
border: 2px solid var(--green);
}

.sort-student {
  padding: 10px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.sort-student::after {
  content: "⠿";
  color: grey;
  position: absolute;
  top: 0;
  right: 0;
  font-size: 28px;
}

.sort-activity > i {
  margin-top: 5px;
  display: none;
}

.sort-activity > i:last-child {
  display: block;
}


#popup {
  display: none;
  position: fixed;
  top: calc(50% - 100px);
  left: calc(50% - 225px);
  width: 450px;
  min-height: 200px;
  background-color: white;
  border-radius: 10px;
  border: 3px solid var(--blue);
  padding: 20px;
  box-shadow: var(--blue) 0 0 50px -15px;
}

#popup-ok {
  right: 20px;
  color: white;
  background-color: var(--orange);
  border: 3px solid var(--orange)
}

#popup-cancel {
  left: 20px;
  color: var(--green);
  background-color: white;
  border: 3px solid var(--green);
}

#popup > button {
  position: absolute;
  bottom: 20px;
  font-size: 18px;
  font-family: Montserrat, sans-serif;
  padding: 5px 10px;
  border-radius: 5px;
}

#toast {
  display: none;
  position: fixed;
  bottom: 15px;
  left: 15px;
  min-width: 300px;
  height: 30px;
  line-height: 30px;
  background-color: white;
  border-radius: 5px;
  border: 3px solid var(--blue);
  padding: 0 5px;
  box-shadow: var(--blue) 0 0 25px -10px;
}

#toast > button {
  position: relative;
  right: -5px;
  float: right;
  background-color: var(--blue);
  border-radius: 0;
  height: 30px;
  line-height: 16px;
}

input[type="text"], input[type="number"] {
  background-color: white;
  border: 3px solid var(--blue);
  padding: 5px;
  font-size: 18px;;
  border-style: none none solid none;
  margin:5px auto;
}

input[type="text"]:focus, input[type="number"]:focus {
  border-color: var(--orange);
  outline: none;
}

input[type="checkbox"] {
  accent-color: var(--green);
  height: 20px;
  width: 20px;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sort-name {
  text-align: center;
  font-family: Montserrat, sans-serif;
  font-size: 24px;
  user-select: none;
}

.admin-choice-open#choice-hover::after {
  content: "+ Add Here";
  color: var(--blue);
  border: 2px dashed currentColor;
}

.admin-choice-full#choice-hover::after {
  content: "Activity Full";
  color: var(--orange);
  border: 2px solid currentColor;
}

#choice-hover::after {
  display: block;
  border-radius: 5px;
  color: white;
  width: calc(100% - 20px);
  padding: 10px;
}

#choice-hover > * {
  pointer-events: none;
}