﻿/*
 This file contains the layout related to the general layout of the page, except the sidebar which is
    decribed in simple-sidebar.css.
*/

body {
  overflow: hidden;
}

.table {
  color: inherit; /* override black color from base.css */
}

.tal-logo {
  width: 200px;
  object-fit: contain;
}

.card-button-header {
  position: absolute;
  top: 0px;
  right: 0px;
  z-index: 2;
}

.card-collapse a > * {
  /* The direct child of a chart collapse header should be inline, because the a itself
        is already 100% wide. If we leave it at block, possible toolbars are pushed to the next line */
  display: inline;
}

.modal-body {
  max-height: 75vh;
  overflow: auto;
  padding-bottom: 0;
  margin-bottom: 0.75rem;
}

.modal-footer {
  position: sticky;
  bottom: 0.75rem;
  z-index: 99;
  padding: 0;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 -7px 7px -8px #a1a1a1;
  border-radius: 2px;
  background-color: rgba(248, 249, 250, 0.85);
}

.collapse-icon {
  display: inline-block !important;
  padding: 4px;
  margin-left: -4px;
  -webkit-transition: .2s ease-in-out;
  -moz-transition: .2s ease-in-out;
  -o-transition: .2s ease-in-out;
  transition: .2s ease-in-out;
}

.collapsed > .collapse-icon {
  transform: rotate(90deg);
  -webkit-transition: .2s ease-in-out;
  -moz-transition: .2s ease-in-out;
  -o-transition: .2s ease-in-out;
  transition: .2s ease-in-out;
}

.badge-counter {
  position: absolute;
  transform: scale(.7);
  transform-origin: top right;
  right: .25rem;
  margin-top: -.25rem;
}

.notification-read {
  display: inline;
}

.notification-stack {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1024;
}

  .notification-stack .toast-header {
    cursor: move;
  }

  .notification-stack .toast {
    opacity: unset;
  }

.form-control.invalid {
  color: var(--danger);
  border-color: var(--danger);
}

/* Based on: https://stackoverflow.com/questions/69672496/blazor-css-keyframes-animation */
.notification-checkmark {
  position: absolute;
  top: 50px;
  right: 20px;
  max-width: 90%;
  z-index: 1024;
}

  .notification-checkmark.has-message {
    background-color: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding-left: 1rem;
    padding-right: 1rem;
    border: solid 1px rgba(122, 193, 66, 0.5);
  }

  .notification-checkmark .checkmark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 10% auto;
    color: #7ac142;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
  }

  .notification-checkmark .checkmark_circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #7ac142;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
  }

  .notification-checkmark .checkmark_check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
  }

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes scale {
  0%, 100% {
    transform: none;
  }

  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

@keyframes fill {
  100% {
    box-shadow: inset 0px 0px 0px 30px #7ac142;
  }
}

/*addition width for the container*/
@media (min-width: 1360px) {
  .container {
    max-width: 1300px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1360px;
  }
}

@media (min-width: 1800px) {
  .container {
    max-width: 1760px;
  }
}

@media (min-width: 2000px) {
  .container {
    max-width: 1960px;
  }
}

@media (min-width: 2500px) {
  .container {
    max-width: 2400px;
  }
}

@media (min-width: 3000px) {
  .container {
    max-width: 2900px;
  }
}
/* Some toolbars (such as toggle graph / chart) use a "btn" as a toggle instead of a proper nav-pill, which is slightly taller.
    If the button is styled as .btn-primary|secondary|... it is not quite clear which option is toggled, as the difference
    in background color between .btn-secondary and .btn-secondary.active is quite small; so give it a soft glow as well.
*/
.nav.nav-pills .btn.active {
  outline: none;
  border-color: #9ecaed;
  box-shadow: 0 0 10px #9ecaed;
}

fieldset.border {
  border: 1px groove #ddd !important;
  padding: 0 1.4em 1.4em 1.4em !important;
  margin: 0 0 1.5em 0 !important;
  -webkit-box-shadow: 0px 0px 0px 0px #000;
  box-shadow: 0px 0px 0px 0px #000;
}

  fieldset.border legend {
    font-size: 1.2em !important;
    font-weight: bold !important;
    text-align: left !important;
    width: auto;
    padding: 0 10px;
    border-bottom: none;
  }


.user-box {
  border: solid 1px #ddd;
  padding: 4px;
  height: 68px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  align-content: stretch;
}

.user-avatar {
  height: 100%;
  padding: 4px;
  padding-right: 10px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

.user-box .user-details {
  flex-grow: 1;
}

  .user-box .user-details .user-name {
    font-weight: bold;
  }

  .user-box .user-details .user-role {
    margin-top: -3px;
    font-size: 90%;
    color: #777777;
  }

@media(max-width: 576px) {
  .user-box .user-action .caption {
    display: none;
  }
}

.mail-address {
  border: solid 1px #dedede;
  border-radius: 0.25rem;
  padding: 5px;
}

/* Elements with .initially-hidden class get display: none on page load,
   but will be hide()'ed by JavaScript so that they can be slideDown()'ed or fadeIn()'ed. */
.initially-hidden {
  display: none;
}

.btn-group {
  /* Make sure toolbar popups appear on top of sticky table headers */
  z-index: 2;
}

.multiselect-native-select .btn-group {
  z-index: auto;
}

.multiselect-container.dropdown-menu.show {
  max-height: 25vh;
  overflow-x: hidden;
}

#parameters.row .col {
  border: 1px solid #ced4da;
  margin: 4px;
  padding: 0px !important;
  display: flex;
  flex-direction: column;
}

  #parameters.row .col > label {
    display: block;
    text-align: center;
    margin: 0px;
    color: white;
    background-color: var(--primary);
    padding: .25rem 3px;
  }

  #parameters.row .col > div {
    padding: .5rem;
    margin-top: auto;
    margin-bottom: auto;
  }


.production-table {
  overflow-x: hidden;
}

  .production-table .row {
    flex-wrap: nowrap;
  }

  .production-table > .table-header .row,
  .production-table > .table-body .row {
    padding-top: 3px;
    padding-bottom: 3px;
  }

  .production-table .table-body > .row:nth-child(2n+1) {
    background-color: var(--light);
  }

  .production-table .table-body > .row:hover {
    background-color: rgba(0, 123, 255, 0.5);
  }

  .production-table > .table-header:first-child {
    border-top: 1px solid #dee2e6;
    padding: 1px;
    color: var(--primary);
  }

  .production-table .table-body,
  .production-table .table-footer {
    border-top: 1px solid #dee2e6;
  }

  .production-table .col-date,
  .production-table .col-initial-stock,
  .production-table .col-produced {
    flex: 10em 0 0;
  }

  .production-table .col-lifted {
    flex: 17.5em 0 0;
  }

  .production-table .col-stock .fa {
    padding-right: 3px;
  }

  .production-table .col-stock,
  .production-table .col-initial-entitlements {
    flex-grow: 1;
  }

  .production-table .col-date {
    font-weight: bold;
  }

  .production-table .row.monday {
    border-top: 1px solid #dee2e6;
    margin-top: 5px;
  }


.table-footer {
  width: 100%;
  display: flex;
}

  .table-footer .page-selects {
    flex-grow: 1;
    text-align: center;
    width: 100%;
  }

    .table-footer .page-selects .page-select {
      transition: all ease 0.5s;
      min-width: 20px;
      padding: 3px;
      text-align: center;
      cursor: pointer;
      margin-top: auto;
      margin-bottom: auto;
    }

      .table-footer .page-selects .page-select.active {
        transition: all ease 0.5s;
        font-weight: bold;
        text-decoration: none;
      }

  .table-footer .items-per-page {
    font-size: 80%;
    white-space: nowrap;
    padding: 0;
  }


    .table-footer .items-per-page input.form-control {
      display: inline;
      width: 3em;
      border: 1px solid gray;
      text-align: center;
      padding: 0;
    }

    .table-footer .items-per-page .dropdown {
      display: inline;
      padding: 0px;
    }

      .table-footer .items-per-page .dropdown .dropdown-button {
        cursor: pointer;
      }

      .table-footer .items-per-page .dropdown .dropdown-button {
        color: var(--bs-text-muted);
        cursor: auto;
      }

      .table-footer .items-per-page .dropdown .dropdown-item .icon {
        display: inline-block;
        width: 1.5em;
      }

.form-check-input {
  margin-left: auto;
  position: relative;
}

.login-box {
  margin-left: auto;
  margin-right: auto;
  width: 50vw;
}
