/*
 * common.scss
 * -----------------------------------------------
*/

/* -------- Basic Structure ---------- */
html {
  font-size: 100%;
  max-width: 100%;
  @include media-breakpoint-down(lg) {
    font-size: 98%;
  }
  @include media-breakpoint-down(md) {
    font-size: 96%;
  }
  @include media-breakpoint-down(sm) {
    font-size: 94%;
  }
}
html,
html a {
  -webkit-font-smoothing: antialiased;
}
body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}
img {
  height: auto;
  max-width: 100%;
}
iframe,
embed,
object {
  margin-bottom: 1.5em;
  max-width: 100%;
}
iframe {
  display: block;
  margin: 0;
  max-width: 100%;
}
ul,
ol {
  margin: 0 0 1.5em 0;
}
ul {
  list-style-type: disc;
}
.media-object {
  max-width: none;
}

/* -------- Line-Bottom ---------- */
.line-bottom-footer-widget {
  position: relative;
  padding-bottom: 10px;
  &:after {
    bottom: -5px;
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    width: 54px;
    background: #555;
  }
}
.line-bottom-centered {
  position: relative;
  margin: 10px 0 20px;

  &:after {
    background: #2b96cc none repeat scroll 0 0;
    bottom: -8px;
    content: "";
    height: 1px;
    left: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    position: absolute;
    right: 0;
    width: 30px;
  }
}

/* -------- Scroll To Top ---------- */
.scroll-to-top {
  display: none;
  a {
    background-size: 200% auto;
    box-shadow: 0 7px 30px rgba($black, 0.3);
    bottom: 15px;
    border-radius: 50%;
    height: 50px;
    padding: 2px;
    position: fixed;
    right: 15px;
    text-align: center;
    text-decoration: none;
    width: 50px;
    z-index: $zindex-scroll-to-top;
    opacity: 0.4;
    display: flex;
    align-items: center;
    justify-content: center;
    i {
      color: var(--theme-color1-text-color);
      font-size: 28px;
    }
    &:hover {
      text-decoration: none;
      opacity: 1;
    }
  }
}

/* table */
.main-content-area table,
.comment-body .comment-text table {
  width: 100%;
  margin: 0 0 40px;
}
.main-content-area table td,
.main-content-area table th,
.comment-body .comment-text table td,
.comment-body .comment-text table th {
  padding: 10px 20px;
  border: 1px solid var(--theme-color-silver);
  text-transform: capitalize;
}
.main-content-area table th,
.comment-body .comment-text table th {
  color: var(--theme-color-dark);
  font-weight: var(--body-font-bold);
}

// star ratings
@mixin star-rating-function() {
  .star-rating {
    float: right;
    overflow: hidden;
    position: relative;
    height: 1.1em;
    line-height: 1.2;
    font-size: 0.9em;
    width: 5.6em;

    &::before {
      content: "\f005\f005\f005\f005\f005";
      color: #d3ced2;
      font-family: "Font Awesome 5 Free";
      font-weight: 900;
      float: left;
      top: 0;
      left: 0;
      position: absolute;
    }

    span {
      overflow: hidden;
      float: left;
      top: 0;
      left: 0;
      position: absolute;
      padding-top: 1.5em;
    }

    span::before {
      content: "\f005\f005\f005\f005\f005";
      font-family: "Font Awesome 5 Free";
      font-weight: 900;
      color: #f1c40f;
      top: 0;
      position: absolute;
      left: 0;
    }
  }
}

.hidden-mobile-mode {
  @include media-breakpoint-down(xl) {
    display: none !important;
  }
}

.alert {
  padding: 1.25rem 1.25rem;
}
.alert-dismissible .close {
  padding: 1.5rem;
}
.alert-dismissible .btn-close {
  top: 50%;
  transform: translateY(-50%);
  filter: invert(1);
  [data-tm-layout="dark"] & {
    filter: invert(0);
  }
}
.btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em 0.25em;
  color: #000;
  background: transparent
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e")
    center/1em auto no-repeat;
  border: 0;
  border-radius: 0.25rem;
  opacity: 0.5;
}
.nice-select {
  font-size: 0.95rem;
  padding-left: 20px;
  padding-right: 38px;
  background-color: var(--theme-color-white);
  color: var(--theme-color-dark);
  border: solid 1px var(--theme-color-silver);
  @include box-shadow(0px 10px 20px rgba(5, 5, 5, 0.05));
  [data-tm-layout="dark"] & {
    background-color: var(--theme-color-gray);
  }
  &:after,
  &:before {
    height: 8px;
    width: 8px;
  }
  &:after {
    right: 18px;
    left: auto;
  }
  &:hover,
  &:focus {
    border: solid 1px var(--theme-color-silver);
  }
  .option {
    [data-tm-layout="dark"] & {
      color: #a9a9a9 !important;
    }
    &:hover,
    &.focus,
    &.selected.focus {
      background-color: var(--theme-color-gray);
    }
    &.selected {
      font-weight: var(--body-font-bold);
    }
  }
  span.current {
    [data-tm-layout="dark"] & {
      color: #a9a9a9 !important;
    }
  }
  .list {
    overflow-y: scroll;
    max-height: 300px;
    background-color: var(--theme-color-white);
    [data-tm-layout="dark"] & {
      box-shadow: 0 0 0 1px rgb(211, 211, 211, 0.16);
    }
  }
}
.description-list {
  dt {
    color: var(--headings-color);
  }
}
.tm-one-vertical-line:before {
  content: "";
  background-color: var(--theme-color1);
  height: 100px;
  width: 2px;
  position: absolute;
  top: -50px;
  left: 50%;
}

.tm-enable-four-vertical-line {
  z-index: 0;
  .tm-four-vertical-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 25px;
    right: 25px;
    z-index: -1;
    .line {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 2px;
      background: rgba(204, 204, 204, 0.25);
    }
    .line-1 {
      left: 0;
    }
    .line-2 {
      left: 33.33333%;
    }
    .line-3 {
      left: 66.66666%;
    }
    .line-4 {
      right: 0;
    }
  }
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px grey;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--theme-color1);
  border-radius: 10px;
}
