@import "colors";
@import "typography";
@import "icons.data.svg";
@import "shared-styles";
@import "breakpoints";
@import "legend";
@import "globalAlert";
@import "static-pages";

html {
  height: 100%;
  width: 100%;
}

body {
  background: #fff;
  box-sizing: border-box;
  color: $text-color;
  font: normal normal normal #{$font-size-default}/ 1.55 #{$font-stack-default};
  height: 100%;
  margin: 0;
  padding: 0;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5 {
  font-weight: 600;
}

p a {
  text-decoration: underline;
}

a {
  color: $blue;
  font-weight: 600;
}

.bg-dark-blue {
  background: $blue-dark;
}

.translated-content {
  display: none; /* hidden until translations load */
}

.search-filter-container {
  z-index: 1;
}

@media screen and (min-width: 800px) and (min-height: 700px) {
  .search-filter-container {
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: -38px;
    z-index: 1;
    background: white;
  }
}

.search-filter-container .bg-dark-blue {
  padding: 2rem 1.25rem;
}

.search-filter-container h4 {
  font-weight: 700;
  font-size: $heading-size-3;
  margin-bottom: 0.25rem;
}

.search-filter-container p {
  font-size: $font-size-default;
}

.search-filter-container .input-group-text {
  padding-right: 0.65rem;
}

.search-filter-container .form-control {
  height: auto;
  font-size: $font-size-small;
}

.filter-collapse {
  background: $blue-light;
}

.social-media-icons {
  margin-top: 1rem;
}

.social-media-icons:after {
  clear: both;
  content: "";
  display: table;
}

.social-media-icon {
  float: left;
  margin-right: 10px;
  width: 25px;
  height: 25px;
  margin-top: 0px;
}

.social-media-icons .icon {
  width: 25px;
  height: 25px;
}

.subhead {
  margin: 20px auto 40px auto;
  display: flex;
  align-items: center;
  text-align: center;
  width: 55%;
  padding: 10px 20px;
  border-radius: 2px;
}

.locations-container {
  padding: 0;
  margin: 0;
}

.locations-list-header {
  padding: 0;
  margin: 0;
  border-bottom: 1px solid $border-gray;
}

.locations-list-header > * {
  padding: 1rem 2rem;
}

.locations-list-header #list-stats {
  font-size: $font-size-default;
  font-weight: 600;
}

.location {
  border-bottom: 1px solid $border-gray;
  padding: 1.5rem 2rem;
  font-size: $font-size-small;

  &:hover,
  &.highlighted {
    background-color: $gray;
  }
}

.location label {
  font-weight: 600;
}

.map-container {
  height: calc(100vh - 58px);
}

#map .separator {
  margin: 10px 0 10px 0;
  padding-top: 2px;
  border-top: 1px solid $border-gray;
}

#map h5 {
  font-family: $font-stack-default;
}

#map .label {
  font-family: $font-stack-default;
  color: $text-color;
  font-weight: 600;
}

#map .value {
  font-family: $font-stack-default;
  font-size: $font-size-small;
  padding-bottom: 6px;
}

.locations-loading {
  padding-top: 20px;
}

.load-spinner {
  animation: 5s load-spinner infinite linear;
  height: 21px;
  vertical-align: text-top;
  width: 21px;
}

@-webkit-keyframes load-spinner {
  100% {
    transform: rotate(360deg);
    -webkit-transform: rotate(360deg);
  }
}

@-moz-keyframes load-spinner {
  100% {
    transform: rotate(360deg);
    -moz-transform: rotate(360deg);
  }
}

@-ms-keyframes load-spinner {
  100% {
    transform: rotate(360deg);
    -ms-transform: rotate(360deg);
  }
}

.secondarycluster {
  opacity: 0.4;
}

/*********************
  * MAP SEARCH STYLES *
  *********************/

.navbar.ftm {
  background: $blue;
  padding: 0 0.75rem;

  /* For IE10+, but *not Edge* ... */
  @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    /* ... need to implement pseudo "sticky" navbar */
    width: 100%;
    top: 0px;
    z-index: 900;
    position: fixed;
  }
}

/* For IE10+, but *not Edge* ... */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .ie-hidden {
    display: none; /* need to hide some problematic, non-essential elements */
  }

  .ie-spacer {
    height: 54px; /* need an offset to account for navbar */
  }
}

.navbar.ftm .nav-link,
.navbar.ftm .btn {
  font-size: $font-size-small;
}

.navbar.ftm .navbar-brand,
.navbar.ftm .add-donation-site-form,
.navbar.ftm .add-makerspace-form {
  display: flex;
  min-height: 100%;
  align-items: center;
  padding-left: 1rem;
  padding-right: 1rem;
}

.navbar.ftm .navbar-brand {
  flex-direction: row;
  font-size: inherit;
  font-weight: 700;
  padding: 0;
  text-transform: uppercase;
  height: 54px;
}

.navbar.ftm .navbar-toggler {
  border: 0;
}

.navbar.ftm .navbar-brand .text {
  display: inline-block;
  font-weight: 700;
}

.navbar.ftm .navbar-nav .nav-link {
  padding: 1rem;
  font-weight: 600;
}

.navbar.ftm .navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.navbar.ftm .navbar-nav .home-link {
  cursor: pointer;
  color: $text-light;

  padding-left: 42px;
  background-size: 42px;
  line-height: 42px;
  display: block;

  &:hover {
    color: $text-light;
  }
}

.navbar.ftm .nav-item {
  white-space: nowrap;
}

.navbar.ftm .dropdown-menu {
  border: none;
  border-radius: 0;
  margin-top: 0;
}

.navbar.ftm .dropdown-menu,
.navbar.ftm .dropdown-item {
  background: #3f5cbb;
  color: #fff;
  font-size: $font-size-small;
  font-weight: 600;
}

.navbar.ftm .dropdown-item {
  padding: 0.4rem 1rem;
}

.navbar.ftm .dropdown-item:hover {
  background: $blue;
}

/* For IE10+, but *not Edge* ... */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .btn-addplace,
  .btn-xlink {
    transform: translateY(25%); /* ... need to adjust vertical position. */
  }
}

.navbar.ftm .btn-addplace {
  color: #fff;
  background: $pink;
  white-space: nowrap;
  font-weight: 600;
  padding-left: 1rem;
  padding-right: 1.4rem;
}

.navbar.ftm .btn-addplace:hover {
  background: #f84e7c;
}

.navbar.ftm .btn-addplace .icon,
.icon-requester-pin.icon {
  display: inline-block;
  vertical-align: middle;
  height: 18px;
  width: 18px;
  margin-right: 6px;
  position: relative;
  top: -2px;
  background-size: contain;
  background-position: center;
}

.navbar.ftm .xlink {
  display: flex;
  min-height: 100%;
  align-items: center;
}

.navbar.ftm .btn-xlink {
  color: #000;
  background: #fdc276;
  white-space: nowrap;
  font-weight: 600;
  padding-left: 1rem;
  padding-right: 1.4rem;
}

.navbar.ftm .btn-xlink:hover {
  background: #fdd197;
}

.navbar.ftm .btn-xlink .icon,
.icon-ftmakers_logo.icon {
  display: inline-block;
  vertical-align: middle;
  height: 18px;
  width: 18px;
  margin-top: 0px;
  margin-bottom: 0px;
  margin-right: 6px;
  position: relative;
  top: -2px;
  background-size: contain;
  background-position: center;
}

#countries-dropdown .icon,
#countries-dropdown-selector .icon {
  display: inline-block;
  vertical-align: middle;
  height: 18px;
  width: 18px;
  margin-right: 8px;
  position: relative;
  top: -1px;
  background-size: cover;
}

/* Mobile first: Desktop breakpoint overrides below */

@media (min-width: $breakpoint-sm) {
  .search-filter-container .bg-dark-blue {
    padding: 2rem;
  }
}

@media (min-width: $breakpoint-md) {
  .map-container {
    position: fixed;
    height: calc(100vh - 58px);
    width: 50%;
  }
}

@media (max-width: $breakpoint-md) {
  .search-input {
    margin: 0px;
    margin-right: 15px;
  }

  .navbar.ftm {
    padding: 0;
  }

  .navbar.ftm .navbar-brand {
    margin-left: 0.5rem;
  }

  .navbar.ftm .navbar-nav .nav-link {
    text-align: center;
    padding: 0.75rem;
  }

  .navbar.ftm .dropdown-item {
    text-align: center;
  }

  .navbar.ftm .add-donation-site-form {
    padding: 0 1rem 0.5rem 1rem;
  }

  .navbar.ftm .xlink {
    padding: 0 1rem 0.5rem 1rem;
  }

  .navbar.ftm .btn-addplace {
    width: 100%;
    margin: 0;
  }

  .navbar.ftm .btn-xlink {
    width: 100%;
    margin: 0;
  }
}

@media (max-width: $breakpoint-xs) {
  h2.state {
    padding: 4px 10px;
  }
  h3.city {
    margin-left: 10px;
  }

  .locations-list-header > *,
  .location {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .search-filter-container h4 {
    font-size: $heading-size-3-mobile;
  }

  .search-filter-container p {
    font-size: $font-size-small;
  }
}

/*************************
  * END MAP SEARCH STYLES *
  *************************/

@media screen and (max-width: $breakpoint-sm) {
  .content-container {
    margin-left: 15px;
    margin-right: 15px;
    width: auto;
  }

  .subhead {
    width: 100%;
    padding: 0;
    flex-direction: column;
  }

  .nav-link {
    font-size: $font-size-xs;
  }
}
/****************
Data-blog hackery
****************/

div.figure {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
div.caption {
  text-align: left;
  font-style: italic;
  margin: 0 auto;
  max-width: 800px;
  color: #666;
}

div.figure img {
  width: 100%;
  height: auto;
  max-width: 800px;
  margin: 1rem auto 0 auto;
  display: block;
}

/****************************************************************
  * NAVBAR LARGE TABLET / SMALL DESKTOP SIZE TRANSITIONAL STUFF *
 ****************************************************************/

@media (max-width: 1265px) and (min-width: $breakpoint-md) {
  .navbar.ftm .navbar-nav .nav-link {
    font-size: $font-size-xs;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .navbar.ftm .btn-xlink,
  .navbar.ftm .btn-addplace {
    font-size: $font-size-xs;
  }
}
