* {
  box-sizing: border-box;
}

body {
  background-color: #000;

  a, a:hover { text-decoration: none }
  .navbar {
    margin-bottom: 0;
    border-bottom: 0.2rem solid #888;
    p.navbar-text { padding:0 1.5rem; }
  }

  .icon {
    font-size:2rem; line-height:2rem; margin:0 1rem;
    border-radius: 1rem; padding: 1rem; vertical-align:middle;
    background:rgba(255, 255, 255, 0.8);
    &:first-child { margin-left:0 }
    &:last-child { margin-right:0 }
  }
}

html, body {
  font-family: "Roboto Condensed", Arial, Helvetica, sans-serif;
}

body {
  &.dev {
    border: .25em dashed orange;
  }
}

h1 {
  font-size: 1.75em;
  color: #858d93;
}

table {
  width: 100%;
  max-width: 100%;
}

a:link[target=_blank] {
  padding-right: 1em;
  background: no-repeat right center url("../images/external_link-7720888d98f32ae2d001ec6e17c49604.svg");
}

.form-control {
  border-radius: 0;
  box-shadow: none;
}

textarea.form-control {
  min-height: 9.625em;
}

output {
  display: inline-block;
}

.body {
  display: flex;
}

.main {
  order: 2;
  flex: 1 0 90%;
}

.side-panel {
  order: 1;
  flex: 0 0 10%;
}

.layout-fluid {
  .main {
    flex: 1 0 auto;
  }

  .side-panel {
    flex: 0 0 11em;
  }
}

[data-field="lastName"]{
  text-transform: uppercase;
}

.nav-pills {
  li.active {
    a {
      background-color: grey;
    }
  }
}

a{
  &:hover {
    text-decoration: none;
  }
}

/* CSS for the navBar */
.navbar{
  background-color: #212121;
  border: none;
}

/* CSS for the pagination */
.pagination{
  text-align: center;
}
.pagination-buttons{
  display: inline-flex;
  list-style-type: none;
  a {
    padding: 8px 16px;

    li:not(.current-page) {
      color: black;
    }
    &:not(.current-page):hover {
      background-color: #e2e1e0;
    }
  }

}
.current-page{
  background-color: #1976D2;
  color: #EEE;
}
.current-page:hover{
  color: #EEE;
}
a.current-page{
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
}

.after-sep::after, .before-sep::before{
  content: " | ";
  white-space: nowrap;
}

/* CSS global for the buttons */
.button{
  &:active {
    box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2);
    transition-delay: 0s;
    background-color: #2196F3;
  }
  &:hover{
    color: #EEE;
  }
}

/* CSS for the search container */
.search-title{
  font-size: 32px;
}

/* CSS for the action bar */
.action-bar{
  padding-top: 30px;
  padding-bottom: 5px;
  background-color: #fff;
  margin: auto;
}

.navbar{
  margin-bottom: 0;
}

select[multiple]{
  resize: vertical;
}

/* When the burger menu appear we set is position on fixed to float above the body */
@media screen and (max-width: 768px){
  body>.navbar{
    position: fixed;
    right: 0;
    left: 0;
    top: 0;
    z-index: 100;
  }
  body{
    padding-top: 50px;
  }
  .dropdown:hover:not(.open) .dropdown-menu{
    display: none;
  }
  .navbar-collapse.in{
    overflow-y: auto;
    height: 70vh;
  }
}

.entitySearch{
  position: absolute;
  z-index: 1;
  width: calc(100% - 30px);

  background-color: #555;
  list-style: none;
  padding: 0;

  li{
    padding: 2px;

    a{
      display: block;
      padding: 2px;
      color: white;

      &:hover{
        background-color: darkorange;
      }
    }
  }
}


.block-container {
  background-color: #E0E0E0;
  padding: 1em;
  margin: 0 auto;

  &.search-container {
    margin-bottom: 1.5em;
  }

  &.dashboard-container {
    background-color: #FFF;

    col.highlight {
      background-color: #ffd2d2;
    }

    table {
      background-color: #E0E0E0;
      text-align: center;

      th, td {
        border: 1px solid #333;

        &.trimester {
          background-color: #E0E0E0;
          color: #858d93;
        }
      }
    }

  }

  &.entities-container {
    background-color: #FFF;
    .field-name {
      font-weight: bold;
    }

    input {
      background-color: #FFF;

      &[disabled] {
        background-color: #CCC;
      }
    }


    tr, .even, .form-group {
      background-color: #EEE;

      &.form-group:nth-of-type(odd) {
        background-color: #FFE;
      }
    }

    tr.even:hover, tr.odd:hover {
      background-color: #FFF;
    }
    .odd {
      background-color: #FFE;
    }

    .form-group {
      margin-bottom: 0;
      border-top: 1px solid #858d93;

      .btn-suppr {
        float: right;
        margin: 20px;
        font-weight: bold;

        &:hover {
          background-color: red;
          color: white;
        }
      }
    }

    .form-group .form-group {
      margin-left: 0;
    }

    td {
      border-top: 1px solid #333;

      &.numeric {
        text-align: right;
      }
    }
  }

  &.entity_fields {
    dl {
      display: flex;
      flex-flow: row wrap;
    }

    dt {
      flex: 0 1 20%;
      text-align: right;

      &:nth-of-type(odd), &:nth-of-type(odd) + dd {
        background-color: #ffe;
      }
    }

    dd {
      flex: 0 1 80%;
      overflow-wrap: anywhere;

      &+dd {
        margin-left: 20%;
      }

      &.heading {
        font-size: 1.5em;
        font-weight: bold;
      }

      .color {
        margin: -3px;
        padding: 3px;
        font-weight: bold;
        border-radius: 0.5rem;
      }
    }

    dd, dt {
      padding: .5rem 1rem;
      background-color: #E0E0E0;
      border-top: 1px solid #858d93;
    }
  }
}

.block-container-sep {
  background-color: #FFF;
  height: 1em;
}

/* CSS for the title */
.title {
  background:linear-gradient(to left, #000, #666 20%, #666 80%, #000);
  border-bottom:0.2rem solid #888;
  color: #EEE;
  text-align: center;

  > h1 {
    margin:0;
    padding: 1rem;
    color: #EEE;
  }
  > .subtitle {
    font-size: .85em;
  }

  a {
    color: #367;
  }
}

.button {
  font-size: 1.2em;
  border-radius: 0.5rem;
  background: linear-gradient(#BBB, #777);
  &:hover, &:active, &:focus {
    background: #999;
    transition:none;
  }
}

/* */
table.records-list {
  td {
    border-bottom: 1px solid #666;

    &[role=navigation] {
      padding: 0;
    }
  }
}

/* Total fields in tables */
tfoot.total-field {
  .total-label {
    text-align: center;
  }

  tr {
    font-weight: bold;
  }
}

/* Registration list in TrainingSession page */
table.secondary {
  width: 100%;

  tr {
    td {
      border-top: 1px solid #858d93;
    }

    &:nth-of-type(even) {
      background-color: #E0E0E0;
    }

    &:nth-of-type(odd) {
      background-color: #ffe;
    }
    &.highlighted {
      background-color: #AFA;
    }
  }
}

/* buttons "show" and "edit" of each entity */
.quick-actions {
  list-style-type: none;
  display: flex;
  gap: .5em;
  padding: 0;
  margin: 0;

  & > li {
    text-align: center;
  }

  a, button {
    display: block;
    padding: .5em 1em;
    background-color: #21536a;
    color: #E0E0E0;
    border: 0 none transparent;

    &.toggle-overview {
      cursor: pointer;
    }

    &:active {
      box-shadow: 0 .5em 1em #000;
    }

    &:hover {
      background-color: #368;
      color: #F0F0F0;
    }
  }
}

.dashboard__header {
  text-align: center;
}

.dashboard__column--current {
  background: #fcc;
}

.input-group {
  z-index: 1;
}

/*Add a red asterisk to the required fields */
label.required:after {
  content: " *";
  color: red;
}

/* dropdown fix */
.dropdown-menu {
  max-height: 60vh;
  overflow-y: auto;
}

.dropdown-toggle:hover {
  cursor: pointer;
}

@media screen and (min-width: 768px) and (max-width: 1608px) {
  .nav > li > a {
    padding-top: 5px;
    padding-bottom: 5px;
  }
}

.add_item_link {
  margin: 1rem 0;
}

.user-select-all {
  user-select: all;
  -moz-user-select: all;
  -ms-user-select: all;
  -webkit-user-select: all;
}
.warning {
  font-weight: bolder;
  color: darkorange;
}
.success {
  color: darkgreen;
}

.office-worked {
  background-color: #99ffcc;
}

.not-worked {
  background-color: #ccc;
}

.home-worked {
  background-color: #99ccff;
}

.half-worked {
  background-color: orange;
}

#feedbacks_center_chart {
  height: 35.3rem;
}
/* extra and funding widgets */
div.extra {
  summary {
    cursor: pointer;
  }
  ul {
    list-style: square;
  }
}

a.fill-field {
  cursor: pointer;
}

/* Dawan ribbon */
.block-container.ribbon {
  border-bottom: 0.1rem solid #858d93;
  padding:0.5rem 0;
  font-size: .8em;
  color: #858d93;
  &>ul {
    display: inline-flex;
    list-style-type: none;
    padding: 0;
    &>li {
      text-align: center;
      padding: 0 1ch;

      & svg {
        height: 4em;
      }
    }
  }
  button {
    border: 1px solid #858d93;
    padding: 0;
    background-color: transparent;
    width: 30px;
  }

  a {
    color: #222;
  }


  > ul {
    > li, li>div {
      margin: 0;
      *+& {
        margin-left: 1rem
      }
      > a {
        font-size: 1.5rem;
        line-height:2.5rem;
        display: block;
        border-radius: 1rem;
        padding: 1rem;
        background:linear-gradient(#FFF, #DDD);
        box-shadow: 0 0.1rem 0.2rem #000;

        &:hover {
          background: #FFF;
        }

        > span:first-child {
          vertical-align: baseline;
          font-size: 2rem;
          padding-right:0.5em;
        }
      }
    }
  }

  .dropdown {
    display: flex;
    > button {
      margin-left: 5px;
      border-top: none;
    }
  }

  .bi {
    display: inline-block;
    font-size: 3em;
    color: black;

    &.add {
      font-size: 1.8em;
      position: absolute;
      bottom: 0.7em;
      right: 1em;
      background: #e0e0e0;
      border-radius: 50%;
      line-height: 0.7;
    }
  }
}

/* Dawan Actions */
.block-container.local-actions {
  padding: 0.2rem 1rem;
  background-color: #FFF;
  position: sticky;
  top: 0;

  ul {
    display: flex;
    flex-flow: row wrap;
    list-style-type: none;
    padding: 0;
    margin: 5px 0;
  }
  li {
    margin: 2px;
  }
  a,.link {
    display: block;
    padding: 0 1ch;
    text-decoration: none;
    border: 1px solid #337ab7;
    border-radius: 4px;
    &:hover,
    &:focus{
      border-color: #23527c;
    }

    &.special {
      background-color: #337ab7;
      color: #fff;
      &:hover,
      &:focus{
        background-color: #23527c;
      }
    }
  }
  .link{
    background: inherit;
    color: #337ab7;
    &:hover,
    &:focus{
      color: #23527c;
    }
  }
}

/* Dawan sidebar */
.nav-block {
  &:not(:first-child) {
    border-top: 1px solid #858d93;
  }
  h1 {
    font-size: .8em;
    color: #21536a;
  }

  ul {
    list-style-type: none;
    padding: 0;
    margin-top: 10px;
  }
  li {
    border-bottom: 1px solid #858d93;
  }

  a {
    font-size: .8em;
    color: #21536a;
    display: block;
  }
  a:hover {
    background-color: #FFF;
  }

  &.bookmark li {
    position: relative;
  }

  &.bookmark a+a {
    position: absolute;
    top: 0;
    right: 0;
  }
}

.shortcuts {
  a {
    font-size: 1em;
    color: #21536a;
  }
  a:hover {
    background-color: #FFF;
  }
}

/* Dawan tables - paginate */
.pag_full {
  padding: 1rem 0;
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  >* {
    padding:0;
    margin:0;
  }
}
.paginate {
  > ul {
    display: flex;
    align-items: center;
    text-align: center;
    list-style: none;
    margin: 0;
    padding: 0;

    > li {
      flex: 5rem 0;

      > * {
        border: 1px solid #888;
        padding: 0.5rem;
        display: block;
        color: #000;
        margin: 0;
        min-width:4rem;
      }

      > a {
        background: #DDD;

        &:active, &:hover, &:focus {
          background: #FFF;
        }
      }

      > p {
        background: #CCC;
        color: #888;
      }

      > input, > button {
        min-width: 100%;
        background: #FFF;
        text-align: center;

        &:active, &:hover, &:focus {
          background: #FFF;
        }
      }

      > input {
        border-right-style: dotted;
      }
    }

    > * + li > * {
      border-left: 0
    }
  }
}

/* Dawan tables - overview */
.overview {
   position: fixed;
  top: 1em;
  right: 1em;
  width: 25%;
  height:auto;
  display: none;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  padding: 1rem;
  color: #000;
  box-shadow: 0 0.2rem 1rem #000;
  z-index: 1;

  :hover:first-child ~ & {
    display: block;
  }
}

/* Dawan Forms */
label {
  flex: 0 0 auto;
}

input {
  flex: 0 1 auto;
}

form#filter label.required:after {
  content: "";
}

form#filter {
  label {
    text-align: right;
  }

  .form-control.number-range-min, .form-control.number-range-max {
    width: auto;
  }
}

.checkbox input[type="checkbox"] {
  margin-left: 0;
  margin-top: 0;
}

.vich-file {
  display: flex;
  align-items: center;

  &.asUploadFile{
    color: green;
  }
  &.isDelete{
    color: red;
  }
}

.vich-image {
  display: flex;
  align-items: center;
}

.entity-choices {
  width: 100%;

  option {
    height: 18px;
    padding-top: 4px;
  }
  option:first-child {
    display: none;
  }
}

.enquiry-wizard {
  textarea{
    resize: vertical;
  }
}

.radio-btn {
  input[type=radio] {
    appearance: none;
    margin: 0;

    +label {
      font-weight: normal;
      border: 1px solid #4f4f5d;
      padding: .25em .5em;
      background: #FFF;
      border-radius: .25em;
      cursor: pointer;
    }

    &:checked+label {
      color: #000;
      background: #1b9448;
    }
  }
}

input[type=file]::file-selector-button{
  font-size: 1.2em;
  border-radius: 0;
  border-color: transparent;
  background-color: #DDD;
  cursor : pointer;

  &:hover{
    background-color: #CCC
  }
}

/* Dawan tables - header searches */
.table > thead > tr > th.field {
  vertical-align: top;
}

.field-search__form {
  display: none;

  &.active {
    display: block;
  }

  label {
    display: none;
  }

  .checkbox input[type="checkbox"] {
    margin-left: -20px;
    margin-top: -2px;
  }

  [class^="col-sm-"] {
    padding: 0;
    width: auto;
  }

  [class^="col-sm-"] ~ [class^="col-sm-"] .form-control {
    border-left: none;
  }

  .form-group .input-group-addon {
    border-bottom-left-radius: 0;
    width: 50%;
  }

  .form-group ~ .form-group .input-group-addon {
    border-top-left-radius: 0;
    border-bottom-left-radius: 4px;
  }

}

.field-search__submit {
  width: auto;
}

.block-container.entities-container .daterange {
  border-top: none;
  background-color: rgba(255,255,255, 0);
}

.durationType{
  >div{
    display:inline-block;
    label{
      display: none;
    }
    div{
      padding: 0;
    }
  }
  >.form-group {
    &:first-child {
      > div > input {
        width: 92px;
        margin-right: 12px;
      }
    }
    &:nth-child(2){
      width: 92px;
      input {
        border-left: 1px dashed #000;
      }
    }
  }
  input {
    border-left: 1px solid #000;
  }
}

/* Bulk */
.bulk>form>#form>.form-group {
  >label{
    display: none;
  }
  >div>div{
    display: flex;
    flex-direction: row;
    >.form-group{
      display: flex;
      flex-direction: column;
    }
  }
}

/* Entities */
.trainingsession--empty {
  color: #888;
  font-style: italic;
}

/*
  Progress bar for Tasks completion
*/
.completion {
  float: right;
  width: 80%;
  height: 20px;
  color: #9CF;
  &::-moz-progress-bar { background: #9CF; }
  &::-webkit-progress-bar { background-color: #9CF !important; }
}

.block-container.entities-container tr {
  &.company-unknown {
    background: #E0E0E0;
  }

  &.deferment-to-determine {
    background-color: #FAA;
  }
  &.unconfirmed {
    font-style: italic;
    color: #999;
  }
}

/* Form modals */
.formModal{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  h1{
    color: white;
    font-size: 2em;
    padding-top: 50px;
  }

  .success{
    background-color: white;
    border: green 2px solid;
    border-radius: 8px;
    color: green;
    padding: 4px;
  }

  .cancelIcon{
    position: absolute;
    top: 0;
    right: 0;
    color: white;
    font-size: 44px;
  }

  .cancelIcon:hover{
    cursor: pointer;
  }

  form {
    position: relative;
    padding: 50px 0 100px 0;
    width: 70vw;

    &>div>div:nth-last-of-type(1)>div:nth-last-of-type(1){
      display: flex;
      justify-content: space-around;
    }
  }

  .btn-form {
    display: inline-block;
    padding: 1em;
    width: auto;
  }
}
