@import "materialize";

.primary-color {
  background-color: $primary-color !important;
}

.primary-color-text, .primary-color-text a {
  color: $primary-color !important;
}

.secondary-color {
  background-color: $secondary-color !important;
}

.secondary-color-text, .secondary-color-text a {
  color: $secondary-color !important;
}

rect#background {
  fill: $primary-color !important;
}

.waves-effect.waves-primary .waves-ripple {
  background-color: lighten($primary-color, 5%);
}

.success {
  @extend .light-green, .lighten-3
}

.success-text {
  @extend .green-text;
}

.warning {
  @extend .orange, .lighten-2;
}

.warning-text {
  @extend .orange-text;
}

.error {
  @extend .red, .lighten-3;
}

.error-text {
  @extend .red-text;
}

// used in sidenav

/**********/
/* COMMON */
/**********/

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

header, main, footer {
  margin-left: 300px;
}

@media only screen and (max-width: 992px) {
  header, main, footer {
    margin-left: 0;
  }
}

.materialize-circle {
  @extend .circle;
}

/**********/
/* HEADER */
/**********/

.brand-logo {
  margin-left: 10px;
}

#sidenav-logo {
  height: 70px;
  width: auto;
}

@media only screen and (max-width: 993px) {
  header div.nav-wrapper {
    z-index: -5;
  }
}


/********/
/* MAIN */
/********/

main {
  padding: 10px 20px;
  flex: 1 0 auto;
}

/***********/
/* SIDENAV */
/***********/

ul.sidenav.sidenav-fixed li.logo {
  margin-top: 32px;
  margin-bottom: 50px;
}

ul.sidenav.sidenav-fixed .brand-logo {
  margin: 0;
}

.logo img {
  width: 250px;
}

.sidenav a:not(.collapsible-header) {
  padding: 0 16px;
}

ul.sidenav li.logo > a:hover {
  background: none !important;
}

.sidenav .collapsible-body > ul:not(.collapsible) > li.active a > i, .sidenav.sidenav-fixed .collapsible-body > ul:not(.collapsible) > li.active a > i {
  color: #fff;
}

.sidenav .collapsible-body > ul:not(.collapsible) > li.active, .sidenav.sidenav-fixed .collapsible-body > ul:not(.collapsible) > li.active {
  background-color: lighten($primary-color, 5%);
}

.sidenav-badge {
  min-width: 2rem!important;
}

.sidenav li.search {
  position: relative;
  z-index: 2;
}

.sidenav li.search:hover {
  background-color: #fff;
}

.sidenav li.search .search-wrapper {
  color: #777;
  margin-top: -1px;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);

  -webkit-transition: margin .25s ease;
  transition: margin .25s ease;
}

.sidenav li.search .search-wrapper input#search {
  color: #777;
  display: block;
  font-size: 16px;
  font-weight: 300;
  width: 100%;
  height: 62px;
  margin: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 0 45px 0 30px;
  border: 0;
}

.sidenav li.search .search-wrapper input#search:focus {
  outline: none;
  -webkit-box-shadow: none;
  box-shadow: none;
}

.sidenav li.search .search-wrapper > button.search-button {
  position: absolute;
  top: calc(50% - 18px);
  right: 10px;
}

button.btn-flat.search-button:hover {
  background-color: $button-disabled-background;
}

a.collection-item.search-item {
  padding: 20px 10px;
}

div#search-loader {
  margin: 0.5rem 0 0 0;
  display: none;
}

div#search-results {
  position: absolute;
  margin-top: -10px;
  width: 100%;
}

.search-result-icon {
  position: absolute;
  right: 10px;
}


// Sidenav trigger

header a.sidenav-trigger {
  position: absolute;
  left: 7.5%;
  top: 0;

  height: 64px;
  font-size: 38px;

  float: none;

  text-align: center;
  color: white;

  z-index: 2;
}


// Footer

.footer-icon {
  font-size: 22px !important;
  vertical-align: middle;
}


@media only screen and (min-width: 1384px) {
  .footer-row-large {
    display: flex;
    align-items: center;
  }

  .footer-row-small {
    display: none;
  }
}

@media only screen and (max-width: 1383px) {
  .footer-row-large {
    display: none;
  }

  .footer-row-small {
    display: block;
  }
}

ul.footer-ul {
  display: inline-block;
  text-align: right;
  float: right;
}

.make-it-higher {
  vertical-align: middle;
  line-height: 36px;
}

// Language form in footer

.language-field .select-dropdown {
  @extend .white-text;
}

.language-field svg path:first-child {
  fill: white;
}

//////////////
// HEADINGS //
//////////////

h1 {
  font-weight: 300;
  font-style: normal;
  font-size: 3.6rem;
  line-height: 110%;
  margin: 1.4rem 0 1.68rem 0;
}

h2 {
  font-weight: 300;
  font-size: 3.0rem;
}

/* Collections */

ul.collection .collection-item .title {
  font-weight: bold;
}


// Forms

form .row {
  margin-top: 0;
  margin-bottom: 0;
}

.help-block {
  font-size: 75%;
}

label.chips-checkbox {
  &.active {
    outline: none;
    background-color: $chip-selected-color;
    color: #fff;
  }

  display: inline-block;
  height: 32px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, .6);
  line-height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  background-color: $chip-bg-color;
  margin-bottom: $chip-margin;
  margin-right: $chip-margin;

  > img {
    float: left;
    margin: 0 8px 0 -12px;
    height: 32px;
    width: 32px;
    border-radius: 50%;
  }
}

input[type="checkbox"].chips-checkbox + span {
  padding-left: 0;

  &:before {
    display: none;
    width: 0;
  }
}

// Move label of ckeditor up
.margin-top-35 {
  margin-top: 35px;
}

// Badges

span.badge.new::after {
  content: "";
}

span.badge.new {
  font-size: 1rem;
  line-height: 26px;
  height: 26px;
}

span.badge.new.no-float {
  float: none;
  padding: 3px 6px;
}

span.badge .material-icons {
  font-size: 0.9rem;
}

.chip .material-icons {
  line-height: 30px;
  margin-right: 10px;
  margin-left: -2px;
}

/*+++++++++*/
/* Buttons */
/*+++++++++*/

.btn-flat-large {
  line-height: 60px;
  height: 60px;
}

.btn-flat-large i {
  font-size: 4rem;
}

.btn-flat-medium {
  line-height: 40px;
  height: 40px;
}

.btn-flat-medium i {
  font-size: 2rem;
}

.btn.primary, .btn-large.primary, .btn-small.primary {
  background-color: rgba(0, 0, 0, 0.05) !important;
  color: black !important;
}

.btn.primary:hover, .btn-large.primary:hover, .btn-small.primary {
  background-color: $primary-color !important;
  color: whitesmoke !important;
}


/* Table*/

table.striped > tbody > tr:nth-child(odd), table tr.striped, table tbody.striped tr {
  background-color: rgba(208, 208, 208, 0.5);
}

th.orderable > a {
  color: rgba(0, 0, 0, 0.6);
  display: block;
  width: inherit;
  height: inherit;
}

th.orderable > a::after {
  @extend .material-icons;
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
  float: right;
  content: "unfold_more";
}

th.orderable.asc > a {
  color: inherit;

  &::after {
    content: "expand_less";
  }
}

th.orderable.desc > a {
  color: inherit;

  &::after {
    content: "expand_more";
  }
}

/*+++++++*/
/* Print */
/*+++++++*/
#print-header {
  display: none;
}

.print-icon {
  margin-top: 1.52rem;
}

@media print {
  body {
    font-size: 15px;
  }

  header, main, footer {
    margin-left: 0;
  }

  ul.sidenav {
    display: none !important;
    transform: translateX(-105%) !important;
  }

  nav {
    display: none;
  }

  .sidenav-trigger {
    display: none;
  }

  #print-header {
    display: block;
    border-bottom: 1px solid;
    margin-bottom: 0;
  }

  #print-header .col.right-align {
    padding: 15px;
  }

  main, header {
    padding: 0;
  }

  footer, footer .footer-copyright, footer .container {
    background-color: white !important;
    color: black !important;
  }

  footer a {
    display: none;
  }

  .footer-copyright, .footer-copyright .container {
    padding: 0 !important;
    margin: 0 !important;
  }

  .no-print {
    display: none;
  }
}

// Alerts

.alert ul, .alert p {
  margin: 0;
}

.alert strong {
  font-weight: 700;
}

figure.alert > :not(.material-icons.left){
  margin-left: 39px;
}

.alert figcaption  {
  font-weight: 700;
  font-size: 17px;
  margin: auto;
}

div.alert > p,
div.alert > div,
figure.alert{
  margin: 10px;
  padding: 10px;
  border-left: 5px solid;
}

div.alert.success > p,
div.alert.success > div,
figure.alert.success{
  @extend .success;
  border-color: color("green", "base");
}

div.alert.error > p,
div.alert.error > div,
figure.alert.error {
  @extend .error;
  border-color: color("red", "darken-4");
}

div.alert.primary > p,
div.alert.primary > div,
figure.alert.primary,
div.alert.info > p,
div.alert.info > div,
figure.alert.info {
  background-color: #ececec;
  border-color: $primary-color;
}

div.alert.warning p,
div.alert.warning div,
figure.alert.warning {
  @extend .warning;
  border-color: color("orange", "darken-4");
}

main div.alert p:first-child,
main div.alert div:first-child,
main figure.alert {
  margin-left: -10px;
  margin-right: -10px;
}

// Text collapsible

.text-collapsible > .material-icons {
    font-size: 20px;
    line-height: 15px;
    margin-bottom: 2px;
    margin-left: -1px;
    vertical-align: middle;
    cursor: pointer;
    color: #6d6d6d;
}

.text-collapsible.opened .a,
.text-collapsible.opened > .material-icons.open-icon {
    display: none;
}

.text-collapsible.closed .b,
.text-collapsible.closed > .material-icons.close-icon {
    display: none;
}

// Helpers

.no-margin {
  margin: 0 !important;
}

.no-padding {
  padding: 0 !important;
}

.no-pad-left {
  padding-left: 0 !important;
}

.no-pad-right {
  padding-right: 0 !important;
}

.valign-middle {
  vertical-align: middle;
}

.valign-top {
  vertical-align: top;
}

.valign-bot {
  vertical-align: bottom;
}

.height-inherit {
  height: 100%;
}

.btn-margin {
  margin-bottom: 5px;
}


/* Dashboard */

.card-action-badge {
  float: left !important;
  margin-left: 0 !important;
  margin-top: -3px;
  margin-right: 10px;
}

.event-card {
  padding: 10px;
}

.event-card .title {
  font-size: 18px;
  font-weight: 500;
}

.stacked-card-icon {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

.flex-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.hundred-percent {
  width: 100%;
}

.badge-image {
  position: absolute;
  left: 0;
  top: 10px;
  z-index: 1;
  background-color: $primary-color;
  color: white;
  padding: 2px 10px;
  border-radius: 0 3px 3px 0;
  text-transform: uppercase;
  font-weight: 300;
}

.center-via-flex {
  display: flex;
  align-items: center;
  justify-content: center;
}

.center2-via-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spinner-primary {
  border-color: $primary-color;
}

.dashboard-cards {
  -webkit-column-break-inside: avoid;
  column-count: 3;
}

@media (min-width: 800px) and (max-width: 1460px) {
  .dashboard-cards {
    column-count: 2;
  }
}

@media (max-width: 800px) {
  .dashboard-cards {
    column-count: 1;
  }
}


.dashboard-cards .card {
  display: inline-block;
  overflow: visible;
  width: 100%;
}

.draggable {
  cursor: grab;
}

.jscolor {
  background-color: inherit !important;
  color: inherit !important;
}

.break-word {
  overflow-wrap: anywhere;
}

.card .card-action-light {
	background-color: inherit;
	border-top: 1px solid rgba(160, 160, 160, 0.2);
	position: relative;
	padding: 16px 24px;
}

.margin-top {
  margin-top: 0.7rem !important;
}

.margin-bottom {
  margin-bottom: 0.7rem !important;
}
