/*
  CSS framework by Yiays for ScheduleShop
*/
html, body {
  margin: 0;
  padding: 1rem;
  background: #fcfcfc;
  color: #2a2323;
  font-size: 18px;
  font-family: Arial, Helvetica, sans-serif;
}

/*
  Colour classes
*/
.bg-offwhite {
  background: #fcfcfc !important;
}
.bg-sunrise {
  background: #ffc56c !important;
}
.bg-sunshine {
  background: #f1c232 !important;
}
.bg-sunset {
  background: #ff7c62 !important;
}
.bg-history {
  background: #0e98a7 !important;
}
.bg-ict {
  background: #fcbc71 !important;
}
.bg-maths {
  background: #e06667 !important;
}
.bg-physed {
  background: #ee81b3 !important;
}
.bg-geo {
  background: #f0c231 !important;
}
.bg-art {
  background: #b4a8d2 !important;
}
.bg-drama {
  background: #94c47d !important;
}

/*
  Buttons
*/
.btn {
  display: inline-block;
  font-size: inherit;
  color: black;
  text-decoration: none;
  padding: 1em;
  height: 3em;
  cursor: pointer;
  border: none;
  border-radius: 0.5rem;
  box-sizing: border-box;
  box-shadow:
  rgb(0, 0, 0, 0.25) 0 0 0.25rem,
    inset 0 0 0 100vw rgba(255 255 255 / 0);
  transition: box-shadow 0.25s ease;
}
.btn-large {
  font-size: 1.5rem;
  padding: 0.5rem 1rem;
  height: 2em;
}
.btn:hover {
  box-shadow:
  rgb(0, 0, 0, 0.25) 0.125rem 0.125rem 0.25rem,
    inset 0 0 0 100vw rgba(0 0 0 / 0.125);
}

/* Button rows */
.btnrow {
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  gap:0.5rem;
  align-items: center;
}
.rowsep {
  display:inline-block;
  width:1px;
  height:3rem;
  background:black;
}

/*
  Forms
*/
input {
  color: black;
  font-size: 1rem;
  border: 1px solid #888;
  background: #fcfcfc;
}

/*
  Elements
*/
h1 {
  margin-top: 0;
}
h3 {
  margin: 0;
}

input[type=text] {
  width: 2em;
}

header {
  margin: -2rem;
  margin-bottom: 0;
  padding: 0.1rem 2rem;
  padding-top: 0.5rem;
  color: black;
  background: #e4dadd;
  z-index: 1001;
}
header > img {
  width: 15rem;
  height: auto;
}
header > h1 {
  margin: 0;
}
.inline-icon {
  display: inline-block;
  width: auto;
  height: 1em;
}

hr {
  margin: 1rem 0;
  height: 0;
  border: none;
  border-bottom: 2px solid #999;
}

/*
  Navigation
*/
.nav-item {
  font-family: unset;
  border: none;
  font-size: 1rem;
  padding: 1rem;
  line-height: 1;
}

/* Regular navigation */
.navigation {
  margin: 0 -2rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  font-size: 16px;
  background: #4a94ff;
  border-bottom: white solid 1px;
  box-shadow: rgb(0, 0, 0, 0.125) 0.125rem 0.125rem 0.25rem;
  z-index: 1000;
}
.navigation > .nav-item {
  font-size: 1.25em;
  padding: 0.75em;
  color: white;
  text-decoration: none;
}
.navigation > .nav-item:link {
  box-shadow: inset 0 0 0 100vw rgba(255 255 255 / 0);
  transition: box-shadow 0.25s ease;
}
.navigation > .nav-item:link:hover {
  box-shadow: inset 0 0 0 100vw rgba(255 255 255 / 0.25);
}
.navigation > .nav-item.active {
  font-weight: bold;
}
.nav-item.disabled {
  color: #777;
  text-shadow: rgb(0, 0, 0, 0.25);
  pointer-events: none;
}
.navigation > .nav-spacer {
  flex-grow: 1;
}

/* Bredcrumb navigation */
.breadcrumb {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 -2rem;
  background: #ddd;
}
.breadcrumb > .nav-item {
  position: relative;
  padding-left: 2rem;
  background: #ddd;
  transition: background 250ms ease;
}
.breadcrumb > .nav-item:last-child {
  padding-right: 2rem;
}
.breadcrumb > .nav-item::after {
  content: '';
  position: absolute;
  top: 0;
  border-top: 1.5rem solid transparent;
  border-bottom: 1.5rem solid transparent;
  border-left: 1rem solid #ddd;
  z-index: 1;
  transition: border-left 250ms ease;
}
.breadcrumb > .nav-item::after {
  right: -1rem;
  z-index: 2;
}
.breadcrumb > .nav-item:last-child::after {
  content: none;
}

/* Breadcrumb hover state */
.breadcrumb > .nav-item:hover {
  background: #aaa;
}
.breadcrumb > .nav-item:hover::after {
  border-left: 1rem solid #aaa;
}

/* Breadcrumb select state */
.breadcrumb > .nav-item.active {
  background: #888;
  color: white;
}
.breadcrumb > .nav-item.active::before {
  border-left: 1rem solid #ddd;
}
.breadcrumb > .nav-item.active::after {
  border-left: 1rem solid #888;
}

/* Tabbed panel navigation */
.panel.tabbed {
  position: relative;
  padding-top: 0.5rem;
  margin-top: 4.5rem;
  border-radius: 0 0 1em 1em;
}
.tabbed .tabs {
  display: flex;
  flex-direction: row;
  position: absolute;
  top: -3rem;
  left: 0;
  height: 3rem;
  background: inherit;
  box-shadow: inherit;
  border-radius: 1em 1em 0 0;
  clip-path: inset(-1rem -1rem 0 0);
  overflow-x: auto;
  z-index: 1;
}
.tabbed .tabs .nav-item {
  position: relative;
  box-shadow: inset 0 0 0 100vw rgba(255 255 255 / 0);
  transition: box-shadow 250ms;
  padding-left: 3.5rem;
}
.tabbed .tabs .nav-item:hover {
  box-shadow: inset 0 0 0 100vw rgba(255 255 255 / 50%);
}
.tabbed .tabs .nav-item.active {
  background: inherit;
}
.tabbed .tabs .nav-item > * {
  pointer-events: none;
}
.tabbed .tabs .nav-item .tab-icon {
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid #333;
  box-sizing: border-box;
}

/*
  Panels
*/
.panel {
  position: relative;
  background: #eee;
  border-radius: 1em;
  width: 25rem;
  padding: 1em;
  box-sizing: border-box;
  text-align: center;
  box-shadow: rgb(0, 0, 0, 0.125) 0.125rem 0.125rem 0.25rem;
}
.panel > img {
  width: 100%;
  height: auto;
}

/*
  Layouts
*/
/* Horisontal scroller */
.hscroller {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin: -0.5rem;
  padding: 0.5rem;
  overflow-x: auto;
  box-sizing: border-box;
}
section > .hscroller {
  margin: -0.5rem -2rem;
  padding: 0.5rem 2rem;
}
.panel > .hscroller {
  margin: -0.5rem -1rem;
  padding: 0.5rem 1rem;
}
.hscroller > :first-child {
  margin-left: auto;
}
.hscroller > :last-child {
  margin-right: auto;
}

/* Flex panel rows */
.showcase {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Div as background */
.divbg-parent {
  position: relative;
  contain: layout;
}
.divbg {
  position: absolute;
  inset: 1rem;
  width: calc(100% - 2rem) !important;
  z-index: -1;
}

/*
  Profile previews and editors
*/
.person {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20rem;
  min-width: 15rem;
  min-height: 20rem;
}
#parents .person {
  background: #e1ebee;
}
#children .person {
  background: #e4dadd;
}
.person > img {
  width: 8rem;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 0.5rem solid #888;
  margin-bottom: 1rem;
}
#parents .person > img {
  border-color: #8e0524;
}
#children .person > img {
  border-color: #f2b427;
}
.person > input:not(:last-child) {
  margin-bottom: 1rem;
}
.adduser {
  position: absolute;
  display: flex;
  flex-direction: column;
  inset: 1rem;
  border: 0.5rem dashed #888;
  border-radius: 1rem;
  color: #888;
  font-size: 10rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.adduser:hover {
  box-shadow: inset 0 0 0 100vw rgba(255 255 255 / 1);
}
.removeuser {
  position: absolute;
  font-family: none;
  font-size: 2rem;
  line-height: 1;
  top: -0.5rem;
  right: -0.5rem;
  color: white;
  background: #ff4a4a;
  border: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  animation: pop-in 250ms ease 1;
}
.removeuser:hover {
  box-shadow: inset 0 0 0 100vw rgba(255 255 255 / 25%);
}

/*
  Timetables
*/
.time-demo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  width: 20vw;
  min-width: 15rem;
  max-width: 20rem;
  aspect-ratio: 1;
}
.time-demo > h3 {
  font-size: 1.5rem;
}

#timetable {
  text-align: left;
  width: 100%;
}
#timetable .day {
  display: flex;
  flex-direction: column;
  width: 20rem;
  min-width: 25ch;
  padding: 0.5rem;
  gap: 1rem;
}

#timetable .day h2 {
  margin: 0;
}
#timetable .day .time {
  outline: 0 solid #4a94ff;
  transition: outline 125ms ease-out;
  height: auto;
}
#timetable .day .time.selected {
  outline: 0.5rem solid #4a94ff;
}

#timetable .day .time>* {
  pointer-events: none;
}

/*
  User data summary
*/
#userdata {
  width: 100%;
  min-width: 30rem;
  max-width: 50rem;
  overflow-x: auto;
  margin: 0 auto;
  border-collapse: collapse;
}
#userdata th, #userdata td {
  vertical-align: top;
  border: 2px solid #333;
  padding: 0.5rem;
}
#userdata td:nth-child(odd) {
  background: #aaa;
}
#userdata td:nth-child(even) {
  background: #ddd;
}

/*
  Schedule
*/
.schedule {
  text-align: center;
  width: 100%;
  min-width: 50rem;
  max-width: 70rem;
  overflow-x: auto;
  border-collapse: collapse;
}
.schedule th, .schedule td {
  border: 0.5rem solid #efd167;
  width: 10rem;
  height: 2rem;
  vertical-align: top;
}

/*
  Responsive layout changes
*/
@media screen and (max-width: 600px) {
  .hscroller .panel {
    width: calc(100vw - 4rem);
  }
  .panel .hscroller .panel {
    width: calc(100vw - 6rem);
  }
}

/* Animations */
@keyframes pop-in {
  from {
    transform: scale(0%);
  }
  to {
    transform: scale(100%);
  }
}