@font-face {
  font-family: Lovelo;
  src: url(./Lovelo-Black.woff2);
}

@font-face {
  font-family: Avenir;
  src: url(./Avenir-Book.woff2);
}

:root {
  --colors-background:#f2f4f3;
  --colors-border:#4d4d48;
  --colors-text: black;
  --colors-green: green;
  --colors-orange: orange;
  --colors-yellow: #FBBF0D;
  --colors-box-white: #dedecd;
  --colors-box-yellow: var(--colors-yellow);
}

h1,
h2,
h3 {
  margin: 0;
}

html {
  font-family: 'Avenir';
  font-size: 1.5em;
}

h3 {
  font-family: 'Lovelo';
  font-size: .8rem;
  text-align: center;
  margin-top: .2rem;
  margin-bottom: .2rem;
}

body {
  background-color: black;
  font-family: Arial, sans-serif;
  margin: 0;
  overflow: hidden;
  padding: 6px;
}

body.login {
  background-color: var(--colors-yellow);
  .login-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    align-items: center;
    background-color: var(--colors-box-white);

    border-radius: 12px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem;

    h3 {
      margin-bottom: .5rem;
    }

    img {
      border-radius: 0;
      width: 100%;
    }
  }
}


.logo-box {
  background-color: black;
  background-image: url('/static/absolute_motors_logo.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  border: none;
  border-radius: 0 0 .3rem .3rem;
  right: calc(100vw / 2 - 4rem);

  padding: 0;
  position: absolute;
  top: 0;
  width: 8rem;
  height: 1.5rem;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: calc(100vh - 18px);
}

.row {
  display: flex;
  flex-direction: row;
  flex-grow: 1;
  gap: 6px;

  .box:nth-child(odd) {
      background-color: var(--colors-yellow);
  }

  .box:nth-child(even) {
      background-color: var(--colors-box-white);
  }

  &.header {
    height: 6vh;
    .box {
      flex-basis: 33.33%;
    }
  }

  &.first {
    height: calc(55vh - 9px);
    .box {
      flex-basis: 25%;
      sl-carousel {
        height: calc(55vh - 2rem);
      }
      &:nth-child(2) h3 {
          text-align: left;
      }
      &:nth-child(3) h3 {
          text-align: right;
      }
    }
  }
  &.second {
    height: calc(45vh - 9px);
    .box {
      flex-basis: 25%;
      sl-carousel {
        height: calc(45vh - 2rem);
      }
    }
  }
}

.box {
  border-radius: 6px;
  box-sizing: border-box;
  display: flex;
  flex-basis: 25%;
  flex-direction: column;
  overflow: hidden;
  padding: .2rem .3rem;
}
.box:has(>.job) {
  padding-left: .4rem;
  padding-right: .1rem;
}

.job {
  background-color: rgba(255,255,255, .1);
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
  margin-bottom: .7rem;
  padding: .2rem .3rem .4rem .4rem;
  max-width: calc(100% - 1rem);
  min-width: calc(100% - 1rem);

  &.overdue {
    background-color: red;
  }

  .line-1 {
    display: flex;
    justify-content: space-between;
    font-size: 1.4rem;
    .text {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    sl-badge {
      margin-left: auto;
    }
  }

  .line-2 {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    .text {
      font-family: 'Avenir';
      font-size: 0.7rem;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .date {
      font-size: .7rem;
      font-weight: 600;
    }
  }
}

.checked-in {
  color: var(--colors-green);
}

.employees {
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: space-evenly;
}
.employee {
  background-color: rgba(255,255,255, .1);
  &.checked-in {
    background-color: var(--colors-green);
    color: white;
  }
  &.checked-in.impro {
    background-color: var(--colors-orange);
    color: white;
  }
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 2px, rgba(0, 0, 0, 0.23) 0px 1px 2px;
  display: flex;
  justify-content: space-between;
  margin-bottom: .1rem;
  padding: .2rem .4rem;
  max-width: calc(100% - 1rem);
  min-width: calc(100% - 1rem);
  .name {
    font-size: .9rem;
  }
}

.avatar-letter {
  align-items: center;
  background-color: silver;
  border-radius: 50%;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;



}

.avatar {
  border-radius: 50%;
  height: 50px;
  width: 50px;
  object-fit: cover;
}

/* Shoelace theming see https://shoelace.style/getting-started/customizing */
sl-carousel-item {
  --sl-spacing-medium: .2rem;
  align-items: start;
  aspect-ratio: unset;
  .job {
    margin-left: .2rem;
  }
}

sl-carousel.project {
  --slide-gap: 0;
}

sl-carousel::part(base) {
  gap: 0;
}

sl-carousel::part(pagination) {
  gap: .1rem;
  height:.5rem;
  align-items: center;
}

sl-carousel::part(pagination-item) {
  width: .8em;
  height: .2rem;
}

sl-badge::part(base) {
  padding: 0.2em 0.4em;
}