@use 'sass:math';

@import "mixins";

@import "@fontsource/lato";
@import "@fontsource/signika";
@import "@fontsource/signika/300.css";
@import "@fontsource/signika/700.css";
@import "toastify-js/src/toastify.css";

// Core variables and mixins
@import "custom";
$font-family-bold: Signika;

@import "~bootstrap";

@import "general";
@import "floating_labels";

// include page styles
@import "navbar";
@import "profile";
@import "activities";
@import "forumgroups";
@import "edit";
@import "messages";
@import "map";
@import "admin";

// select2
@import "~select2/src/scss/core";

@import "~@ttskch/select2-bootstrap4-theme/src/single";
@import "~@ttskch/select2-bootstrap4-theme/src/multiple";
@import "~@ttskch/select2-bootstrap4-theme/src/layout";

// Set yaml classes to keep old style alive and consistent
@import "yaml";
// @import "navs";
@import "search";
@import "groups";
@import "forums";
@import "gallery";
@import "offcanvas";

// tempus dominus date time picker
@import "tempusdominus_bootstrap4";
@import "footer";
@import "daterangepicker.scss";

.badge-warning {
    background-color: white;
    color: $brand-primary;
}

.map {
}

.username{
  line-height: 1.1;
  word-wrap: break-word;
}

// This is actually defined in content_minimal but that file is not imported
.unread {
    font-weight: bold;
}

// Fix for location input appearing behind map on search member page
.ui-front {
    z-index: 2000!important;
}

.ck.ck-content blockquote, blockquote {
  color: #444 !important;
  background: transparent !important;
  border: 1px #ddd solid !important;
  border-left: 8px $brand-primary solid !important;
  padding: 0 0.5em !important;
  margin: 0.5em 0 !important;
}

.jumbotron {
  a {
    color: $brand-primary;
  }
}

.leaflet-popup-content-wrapper{
  border-radius: 0.2rem;
}

.divlink  {
  color: black;
  display: block;
  width: 100%;
  height: 100%;

  .p{
    margin-bottom: 0.5rem !important;
  }
}

main {
  margin-top: 1rem;
}

.metrics {
  margin: 1em 0 0;
  overflow: auto;
}

.metrics .metric {
  float: left;
  margin: 0 1em 1em 0;
}

.metric {
  background: #FFF;
  border: 1px solid #E0E0E0;
  box-shadow: 0 0 1px rgba(128, 128, 128, .2);
  min-width: 100px;
  min-height: 70px;
}

.metric .value {
  display: block;
  font-size: 28px;
  padding: 8px 15px 4px;
  text-align: center;
}

.metric .label {
  background: $primary;
  color: white;
  display: block;
  font-size: 12px;
  padding: 5px;
  text-align: center;
}

a.metric .value {
  color: black;
}

a.active .metric .value {
  color: white;
  background: $brand-primary
}

.card-columns {
  @include media-breakpoint-down(sm) {
    column-count: 1;
  }
  @include media-breakpoint-only(md) {
    column-count: 2;
  }
  @include media-breakpoint-only(lg) {
    column-count: 3;
  }
  @include media-breakpoint-only(xl) {
    column-count: 3;
  }
}

.nav-link {
  @include media-breakpoint-down(sm) {
    padding-right: $input-btn-padding-x-sm;
    padding-left: $input-btn-padding-x-sm;
  }
}

#editProfileTab .nav-tabs {
  display:none;
}

@include media-breakpoint-up(md) {
  #editProfileTab .nav-tabs {
    display: flex;
  }

  #editProfileTab .card {
    border: none;
  }

  #editProfileTab .card .card-header {
    display:none;
  }

  #editProfileTab .card .collapse{
    display:block;
  }
}

@include media-breakpoint-down(md){
  #editProfileTab .tab-pane {
    display: block !important;
    opacity: 1;
  }
}

#editProfileTab .nav-tabs {
  // border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;

  .nav-item {
    margin-bottom: -$nav-tabs-border-width;
  }

  .nav-link {
    font-size: $font-size-sm;
    line-height: $line-height-sm;
    padding: $input-btn-padding-y-sm;
    border: $nav-tabs-border-width solid transparent;
    background-color: $secondary;
    color: white;
    @include border-top-radius($nav-tabs-border-radius);

    &.disabled {
      color: $nav-link-disabled-color;
      background-color: transparent;
      border-color: transparent;
    }
  }

  .nav-link.active,
  .nav-item.show .nav-link {
    color: $white;
    background-color: $primary;
    border-color: $primary;
    border: none !important;
  }

}

@import "wiki";

/* styles for the accommodation checkboxes */
.checked {
   border-color: #f37000 !important;
   border-radius: 2px;
   background-color: #f37000 !important;
   outline: 0 !important;
   box-shadow: 0 0 0 0.2rem rgba(243, 112, 0, 1) !important;
}

.not_checked {
  border-color: #fff !important;
  border-radius: 2px;
  background-color: #fff !important;
  outline: 0 !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 1) !important;
}

.alert-notice {
  @extend .alert-info;
}

.alert-error {
  @extend .alert-danger;
}

.community-news-wrapper img,
figure > img {
  max-width: 100%;
  height: auto;
}

figure > figcaption {
  text-align: center;
}

.editor, .ck-editor__editable[role=textbox] {
  min-height: 10rem;
}

// Masonry
.grid-item {
  width:100%;
}

.grid-item-content img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

.grid-item-content {
  margin: .25rem;
  padding: .25rem;
  background: #ddd;
  border: 1px solid #ccc;
}

.custom-file-label-fix {
  overflow: hidden;
  white-space: nowrap;
  // For text overflow we need also padding-right.
  // problem is the button width is not constant.
  padding-right: 6em;
  text-overflow: ellipsis;
}

@mixin make-td-col($size, $columns: $grid-columns) {
  width: percentage(math.div($size, $columns));
}

@each $breakpoint in map-keys($grid-breakpoints) {
  $infix: breakpoint-infix($breakpoint, $grid-breakpoints);

  @for $i from 1 through $grid-columns {
    td.col#{$infix}-#{$i}, th.col#{$infix}-#{$i} {
      @include make-td-col($i, $grid-columns);
    }
  }
}

.rangeSlider, .rangeSlider__fill {
  display: block;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.7);
  border-radius: 10px;
}

.rangeSlider {
  position: relative;
  background: #f7f7f7;
}

.rangeSlider__horizontal {
  height: 20px;
  width: 100%;
  margin-top: 16px;
  margin-bottom: 16px;
}

.rangeSlider__vertical {
  height: 100%;
  width: 20px;
}

.rangeSlider--disabled {
  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
  opacity: 0.4;
}

.rangeSlider__fill {
  background: #f37000;
  position: absolute;
}

.rangeSlider__fill__horizontal {
  height: 100%;
  top: 0;
  left: 0;
}

.rangeSlider__fill__vertical {
  width: 100%;
  bottom: 0;
  left: 0;
}

.rangeSlider__handle {
  border: 1px solid #ccc;
  cursor: pointer;
  display: inline-block;
  width: 40px;
  height: 40px;
  position: absolute;
  background: white linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.1));
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  border-radius: 50%;
}

.rangeSlider__handle__horizontal {
  top: -10px;
}

.rangeSlider__handle__vertical {
  left: -10px;
  bottom: 0;
}

.rangeSlider__handle:after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.13), rgba(255, 255, 255, 0));
  border-radius: 50%;
}

.rangeSlider__handle:active {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.12));
}

input[type="range"]:focus + .rangeSlider .rangeSlider__handle {
  box-shadow: 0 0 8px rgba(142, 68, 173, 0.9);
}

.rangeSlider__buffer {
  position: absolute;
  top: 3px;
  height: 14px;
  background: #2c3e50;
  border-radius: 10px;
}

#mockup {
  background-color: #ccc;
  color: black;
}

#mockup img {
  max-width: 100%;
}

$avatar-sizes: 30, 50, 75, 100, 150, 200, 500;

@each $size in $avatar-sizes {
  .avatar-#{$size} {
    height: #{$size}px;
    width: #{$size}px;
  }
}

.ui-autocomplete-category {
  font-weight: bold;
  padding: .25rem;
}

.translated-text {
  min-height: 200px;
  max-height:300px;
  overflow-y: scroll;
  background-color: #eee;
  border: 1px solid black;
  padding: 1rem;
}

.o-input {
  @extend .form-control;
}

.o-checkbox {
  @extend .form-check;
}

.o-checkbox__input {
  @extend .form-check-input
}

.o-checkbox__label {
  @extend .form-check-label
}

.input-group > .input-group-prepend > .input-group-text {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.u-ellipsis {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/*
 * Multilevel dropdown for bootstrap 4
 */
.dropdown-submenu {
  display: block;
}

.dropdown-submenu.show>.dropdown-menu.show{
  margin-top: 0;
  margin-left: auto;
  transform: none !important;
  position: relative !important;
  width: max-content;
  margin-bottom: .5rem;
}

.avatar-48 {
  width: 48px;
  height: 48px;
  object-fit: cover;
}

.avatar-96 {
  width: 48px;
  height: 48px;
  object-fit: cover;
}

.avatar-160 {
  width: 160px;
  height: 160px;
  object-fit: cover;
}

.form-signin {
  width: 100%;
  max-width: 420px;
  padding: 15px;
  margin: auto;
}

#hamburger_collapse #login_signup
{
  display: none;
}

:focus-visible {
  outline: 0;
}

@media (pointer: coarse), (hover: none) {
  [title] {
    position: relative;
    display: inline-flex;
    justify-content: center;
  }
  [title]:focus::after {
    content: attr(title);
    position: absolute;
    top: 90%;
    color: #000;
    background-color: #fff;
    border: 1px solid;
    width: fit-content;
    padding: 3px;
  }
}

.wrapper-nav {
  position:relative;
  margin:0 auto;
  overflow:hidden;
  padding:5px;
  height:36px;
}

.list {
  position:absolute;
  left:0;
  top:0;
  min-width:3500px;
  margin-top:0;
}

.list li{
  display:table-cell;
  position:relative;
  text-align:center;
  cursor:grab;
  color:#efefef;
  vertical-align:middle;
}

.scroller {
  text-align:center;
  cursor:pointer;
  display:none;
  padding:5px;
  white-space:nowrap;
  vertical-align:middle;
  background-color:transparent;
}

.pointer {cursor: pointer;}

.o-form-group, .o-form-group-sm {
  margin-bottom: 8px;
}

.vanilla-calendar {
  z-index: 1000;
}

[data-calendar-theme="light"] .vanilla-calendar-day__btn_today {
  color: white;
  background-color: #ffb474;
}

.js-password-input:placeholder-shown ~ .js-password-show-hide {
  visibility: hidden;
}

.js-password-input:not(:placeholder-shown) ~ .js-password-show-hide {
  visibility: visible;
}

.js-password-input.is-invalid ~ .js-password-show-hide {
  right: 24px;
}
