@import "./variables";

body {
  margin: 0;
}

.header-footer-fixed {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: space-between;

  &__header {
    flex-shrink: 0;
  }

  &__content {
    flex-grow: 1;
    overflow: auto;
    min-height: 2em;
  }

  &__footer {
    flex-shrink: 0;
  }
}

.digi-loader {
  animation: rotation 1s infinite linear;
}

@keyframes rotation {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(359deg);
  }
}

div.col.check-box,
div.col.button {
  max-height: 35px;
  padding-top: 5px;
  padding-bottom: 35px;
}

div.col.check-box {
  margin-top: 30px;
}

div.col.button {
  margin-top: 20px;
}

html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

ul:not(.browser-default) {
  padding-left: 0;
  list-style-type: none;
}

label {
  > [type="radio"]:not(:checked),
  > [type="radio"]:checked {
    position: static;
    opacity: 1;
    pointer-events: auto;
  }

  > [type="radio"]:not(:checked) + span,
  > [type="radio"]:checked + span {
    // Replace column gap so that a click between the o and the label is also taken into account
    padding-left: 5px;
    padding-right: 5px;

    &:before,
    &:after {
      display: none;
    }
  }
}

[type="checkbox"]:not(:checked),
[type="checkbox"]:checked {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

label {
  font-size: 0.8rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
  line-height: 110%;
}

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
  font-weight: inherit;
}

h1 {
  font-size: 4.2rem;
  margin: 2.8rem 0 1.68rem 0;
}

h2 {
  font-size: 3.56rem;
  margin: 2.3733333333rem 0 1.424rem 0;
}

h3 {
  font-size: 2.92rem;
  margin: 1.9466666667rem 0 1.168rem 0;
}

h4 {
  font-size: 2.28rem;
  margin: 1.52rem 0 0.912rem 0;
}

h5 {
  font-size: 1.64rem;
  margin: 1.0933333333rem 0 0.656rem 0;
}

h6 {
  font-size: 1.15rem;
  margin: 0.7666666667rem 0 0.46rem 0;
}

.left {
  float: left !important;
}

.right {
  float: right !important;
}

table {
  width: 100%;
  display: table;
  border-collapse: collapse;
  border-spacing: 0;

  td,
  th {
    padding: 15px 5px;
    display: table-cell;
    text-align: left;
    vertical-align: middle;
    border-radius: 2px;
  }

  tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }
}

* {
  &:focus-visible {
    outline: none !important;
    border: none !important;
  }
}

input {
  border: none;
}

.hiddendiv {
  visibility: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding-top: 1.2rem;
  position: absolute;
  top: 0;
  z-index: -1;
}

tiny-mce .tox:not([dir="rtl"]) .tox-toolbar__group:not(:last-of-type) {
  border-right: 1px solid #ccc;
}

.tox-tinymce--disabled {
  filter: invert(0.05);
}

.divider {
  height: 1px;
  overflow: hidden;
  background-color: color("grey", "lighten-2");
}

button,
input,
optgroup,
select,
textarea {
  font-family: $font-family;
}

.card {
  position: relative;
  margin: 0.5rem 0 1rem 0;
  background-color: $white;
  transition: box-shadow 0.25s;
  border-radius: 2px;

  label {
    font-size: 0.8rem;
    color: $gray-80;
  }
}

.card,
.btn-floating {
  box-shadow:
    0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 1px -2px rgba(0, 0, 0, 0.12),
    0 1px 5px 0 rgba(0, 0, 0, 0.2);
}

.btn-floating {
  display: inline-block;
  color: $white;
  position: relative;
  overflow: hidden;
  z-index: 1;
  width: 40px;
  height: 40px;
  line-height: 40px;
  padding: 0;
  border-radius: 50%;
  transition: background-color 0.3s;
  cursor: pointer;
  vertical-align: middle;

  &.halfway-fab {
    position: absolute;
    right: 24px;
    bottom: -20px;
  }

  & i {
    width: inherit;
    display: inline-block;
    text-align: center;
    color: inherit;
    font-size: 1.6rem;
    line-height: 40px;
  }

  &.white > .material-icons {
    color: $black-100;
  }

  &.transparent:hover,
  &.white:hover {
    box-shadow:
      0 2px 2px 0 rgba(0, 0, 0, 0.14),
      0 3px 1px -2px rgba(0, 0, 0, 0.12),
      0 1px 5px 0 rgba(0, 0, 0, 0.2);
  }
}

.waves-effect {
  position: relative;
  cursor: pointer;
  display: inline-block;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  vertical-align: middle;
  z-index: 1;
  transition: 0.3s ease-out;
}

.grey-text.text-darken-2 {
  color: $gray-95;
}

.white {
  background-color: $white;
}
