@import './variables.scss';
@import './rotate.scss';
@import 'material-design-lite/dist/material.css';
@import 'material-design-icons/iconfont/material-icons.css';
@import 'font-awesome/css/font-awesome.css';
@import 'animate.css/animate.css';
@import '@angular/material/prebuilt-themes/indigo-pink.css';
@import 'leaflet/dist/leaflet.css';
@import 'leaflet.markercluster/dist/MarkerCluster.css';
@import 'leaflet.markercluster/dist/MarkerCluster.Default.css';

body {
  margin: 0;
  color: rgba(0, 0, 0, 0.87) !important;
}

.flex-vertical {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  overflow: auto;
}

.flex-horizontal {
  display: flex !important;
  flex-direction: row !important;
  flex:1 !important;
  overflow: auto;
}

.flex-wrapper {
  display: flex !important;
  flex-direction: column !important;
}

.flex-fill {
  flex: 1 !important;
}

.flex-scroll {
  overflow: auto !important;
}

.flex-spacer {
  flex: 1 1 auto;
}

.flex-horizontal > ng-component, .flex-vertical > ng-component, .flex-wrapper > ng-component, ng-component > ng-component {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  overflow: auto;
}

.mat-mdc-icon-button {
  background: transparent;
}

// Angular 15 MDC Changes
.mat-mdc-card-content {
  padding: 0 !important;
}

.mat-mdc-header-cell {
  font-size: 12px;
}

.mat-mdc-menu-content, .mat-mdc-menu-content .mat-mdc-menu-item .mdc-list-item__primary-text {
  font-size: 14px;
}

.mat-option-condensed {
  font-size: 14px;
  padding: 0.5rem 1rem !important;
  min-height: 36px !important;
}

.mdl-button {
  color: #787878;
}

.mdl-menu__item {
  color: #787878
}

.mdl-card {
  overflow: visible;
  position: initial;
}

.mdl-card__supporting-text {
  overflow: visible;
  font-size: 16px !important;
}

.mdl-textfield .error {
  color: rgb(213,0,0);
  position: absolute;
  font-size: 12px;
  margin-top: 3px;
  display: block;
}

.container-fixed {
  padding-right: 0;
  padding-left: 0;
  margin-right: auto;
  margin-left: auto;
}

.card-divider-desktop {
  @media (min-width: 840px) {
    border-bottom: 1px solid lightgrey;
    width: 100%;
  }
}

.card-divider-mobile {
  @media (max-width: 839px) {
    border-bottom: 1px solid lightgrey;
    width: 100%;
  }
}

.stack-divider-top {
  border-top: 1px solid lightgrey;
}

/* Phone */
@media (max-width: 479px) {
  .hidden-desktop-down {
    display: none !important;
  }
  .hidden-tablet-down {
    display: none !important;
  }
  .hidden-phone-up {
    display: none !important;
  }
  .hidden-phone-down {
    display: none !important;
  }
  .container-fixed {
    width: 100%;
  }
}

/* Tablet */
@media (min-width: 480px) and (max-width: 839px) {
  .hidden-desktop-down {
    display: none !important;
  }
  .hidden-tablet-up {
    display: none !important;
  }
  .hidden-tablet-down {
    display: none !important;
  }
  .hidden-phone-up {
    display: none !important;
  }
  .container-fixed {
    width: 480px - 36px;
  }
}

/* Desktop */
@media (min-width: 840px) {
  .hidden-desktop-up {
    display: none !important;
  }
  .hidden-desktop-down {
    display: none !important;
  }
  .hidden-tablet-up {
    display: none !important;
  }
  .hidden-phone-up {
    display: none !important;
  }
}

@media (min-width: 840px) and (max-width: 1069px) {
  .container-fixed {
    width: 840px - 36px;
  }
}

@media (min-width: 1070px) {
  .container-fixed {
    width: 980px;
  }
}

.em2m-badge {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 400;
  letter-spacing: 0;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  margin-right: 0.5rem;
  border: 1px solid #888;
  color: #888;
  border-radius: 0.25rem;
  white-space: nowrap;
  display: inline-block;
}


.toggle {
  display: none;

  // add default box-sizing for this scope
  &,
  &:after,
  &:before,
  & *,
  & *:after,
  & *:before,
  & + .tgl-btn {
    box-sizing: border-box;
    &::selection {
      background: none;
    }
  }

  + .toggle-btn {
    outline: 0;
    display: block;
    width: 4em;
    height: 2em;
    position: relative;
    cursor: pointer;
    user-select: none;
    &:after,
    &:before {
      position: relative;
      display: block;
      content: "";
      width: 50%;
      height: 100%;
    }

    &:after {
      left: 0;
    }

    &:before {
      display: none;
    }
  }

  &:checked + .toggle-btn:after {
    left: 50%;
  }

  &:checked + .toggle-btn:before {
    left: 9px;
    top: 9px;
    color: white;
    content: 'ON';
    display: block;
    position: absolute;
    font-size: 14px;
    font-weight: 600;
  }

  &:not(:checked) + .toggle-btn:before {
    right: -2px;
    top: 9px;
    color: white;
    content: 'OFF';
    display: block;
    position: absolute;
    font-size: 14px;
    font-weight: 600;
  }
}

// themes
.toggle-light {
  + .toggle-btn {
    background: #CCC;
    border-radius: 2em;
    padding: 2px;
    transition: all .4s ease;
    &:after {
      border-radius: 50%;
      background: #fff;
      transition: all .2s ease;
    }
  }

  &:checked + .toggle-btn {
    background: rgb(63,81,181);
  }
}

.form-entry {
  display: block;
}

.form-button {
  margin-top: 1.5rem;
}

.stack-info-label {
  font-size: 18px;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.stack-info-value {
  font-size: 18px;
  padding-bottom: 1.25rem;
  font-weight: 200;
}

.mat-drawer-backdrop {
  opacity: 0 !important;
}

.leaflet-control-icon {
  width: 26px;
  height: 26px;
  background-color: #FFF;
}

.leaflet-fa-icon {
  margin: 3px;
  font-size: 20px;
}

button::-moz-focus-inner {
  border: 0;
}

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

// Material Form Overrides

/* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
.mat-mdc-form-field-appearance-outline .mat-mdc-form-field-wrapper {
  margin: 0 !important;
}

/* TODO(mdc-migration): The following rule targets internal classes of checkbox that may no longer apply for the MDC version. */
.mat-mdc-checkbox-label {
  font-size: 16px;
}
/* TODO(mdc-migration): The following rule targets internal classes of checkbox that may no longer apply for the MDC version. */
surveyor-mat-checkbox-input > .mat-mcd-checkbox-layout {
  padding-bottom: 1rem;
}

.mdl-dialog__content {
  color: rgba(0, 0, 0, 0.87) !important;
}

.mat-mdc-input-element {
  color: rgba(0, 0, 0, 0.87) !important;
}


/* Custom Scrollbar Styles */
.scrollable {
  overflow: auto;
}
.scrollable-x {
  overflow-x: auto;
  overflow-y: hidden;
}
.scrollable-y {
  overflow-y: auto;
  overflow-x: hidden;
}
/*
.scrollable,.scrollable-x,.scrollable-y {
  -ms-overflow-style: -ms-autohiding-scrollbar;
  scrollbar-width: thin;
  scrollbar-color: #aaaaaa #f0f0f0;

  &::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  &::-webkit-scrollbar-thumb {
    background-color: #aaaaaa;
  }
  &::-webkit-scrollbar-track {
    background-color: #f0f0f0;
  }
}
*/
