$primary: #fea500;

@import "logo";

$icomoon-font-path: "../font";
@import "icons/style";

$flag-icon-path: '../img';
@import "icons/flags";

@import "bootstrap/scss/bootstrap-grid";
@import "bootstrap/scss/bootstrap-reboot";
@import "bootstrap/scss/bootstrap-utilities";
@import "bootstrap/scss/type";
@import "bootstrap/scss/buttons";
@import "bootstrap/scss/badge";
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins/_breakpoints";

html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

body {
  background-color: #222;
  background-image: url("../img/bg.jpg");
  color: #fff;
  min-height: 100vh;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

ul {
  list-style: disclosure-closed;
}

p {
  text-align: justify;
}

.content {
  flex: 1;
  padding: 1.5rem 0;
}

@include media-breakpoint-up(lg) {
  .content {
    padding: 3rem 0;
  }
}

.highlight {
  color: $primary;
}

.fill-col-inner {
  display: flex;
  align-items: center;
}

.logo {
  display: block;
  margin: 0 auto;
  max-width: 128px;
  max-height: 128px;

  &.huge {
    width: 256px;
    height: 256px;
    max-width: 256px;
    max-height: 256px;
  }

  &.mini {
    width: 32px;
    height: 32px;
  }
}

@include media-breakpoint-down(lg) {
  .logo {
    max-width: 64px;
    max-height: 64px;

    &.huge {
      width: 128px;
      height: 128px;
      max-width: 128px;
      max-height: 128px;
    }
  }
}

.me-profile {
  display: block;
  height: 256px;
  width: 256px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;

  img {
    position: relative;
    z-index: -1;
    width: 100%;
    height: 100%;
  }
}

@include media-breakpoint-down(lg) {
  .me-profile {
    height: 128px;
    width: 128px;
  }
}

.nav {
  display: flex;
  background-color: #111;
  justify-content: start;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;

  .toggle {
    padding: 1rem 1.5rem;
    display: none;
  }

  #menu {
    display: none;
  }

  .items {
    display: flex;
    align-items: center;

    .item {
      display: flex;
    }
  }
}

@include media-breakpoint-up(md) {
  .nav {
    .i-fw {
      width: unset;
    }
  }
}

@include media-breakpoint-down(md) {
  .nav {
    display: block;
    padding: 0;

    .toggle {
      display: flex;

      label:hover {
        text-decoration: underline;
        cursor: pointer;
      }
    }

    .logo {
      display: none;
    }

    .items {
      display: none;

      .item {
        border-top: 1px solid #fff;

        a {
          display: block;
          padding: .75rem 1.5rem;
        }
      }
    }

    input:checked ~ .items {
      display: block;
    }

    .lang-large {
      display: none !important;
    }
  }
}

.menu {
  a {
    color: #fff;
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }

  .active a {
    font-weight: bold;
  }
}

.flex-grow {
  flex: 1;
}

.card {
  background-color: #111;
  border: 1px solid #fff;
  padding: 1rem;
}

.card-list {
  margin-bottom: 1rem;

  .card {
    border-bottom: none;
  }

  .card:last-child {
    border-bottom: 1px solid #fff;
  }
}

.service {
  position: relative;
  height: 100%;
  padding: 0;

  .link {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
  }

  .beta {
    position: absolute;
    top: 0;
    right: -1rem;
    font-weight: bold;
    background-color: $primary;
    color: #000;
    padding: .5rem 1rem;
    border-radius: 10px;
    transform: rotate(20deg);
    box-shadow: -1px 3px 5px rgba(255, 255, 255, .3);
  }

  .inner {
    position: relative;
    pointer-events: none;
    z-index: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;

    a {
      pointer-events: all;
    }
  }

  &.flat {
    .inner {
      flex-direction: row;
      text-decoration: none;

      h2 {
        margin-left: 0.5rem;
      }
    }
  }
}

.contact-links a {
  color: #fff !important;
}

code {
  background-color: $primary;
  color: #000;
  padding: 1px 3px;
  border-radius: 4px;
}

pre {
  background-color: $primary;
  color: #000;
  padding: 10px 15px;
  border-radius: 4px;

  code {
    background-color: initial;
    padding: initial;
    border-radius: initial;
  }
}

.table-container {
  overflow-y: auto;
}

table.table {
  width: 100%;
  margin-bottom: 16px;
  background-color: #111;

  tr:nth-child(2n) {
    background-color: #ffffff0b;
  }

  td, th {
    padding: 6px 13px;
    border: 1px solid #444;
  }
}

.article-content {
  img {
    display: block;
    margin: 0 auto 1rem;
    max-width: 100%;
  }

  .img-gallery {
    --bs-gutter-x: 1rem;

    a {
      display: flex;
      flex-direction: column;
      height: 100%;
      padding-bottom: 1rem;

      img {
        width: 100%;
        margin: 0;
      }

      small {
        padding: .5rem;
        flex-grow: 1;
        background-color: $primary;
        color: #000;
      }
    }
  }
}

.tab-card {
  margin-bottom: 2rem;

  .title {
    background-color: $primary;
    color: #000;
    font-weight: bold;
    padding: 5px 10px;
    border: 1px solid #fff;
    border-bottom: none;
  }
}

.side-banner {
  float: right;
  width: 30%;
  margin-left: 1rem;
  margin-bottom: 1rem;
}

.ossrox-logo {
  max-width: 250px;
}

.tab-card.ossrox {
  position: relative;

  .link {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
  }

  .title {
    background-color: #006269;
    color: #fff;
    padding: .75rem;
    text-align: center;
  }

  img {
    max-width: 200px;
    max-height: 30px;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --bs-border-color: #000;
  }

  body {
    background-color: #ddd;
    background-image: url("../img/bgl.jpg");
    color: #000;
  }

  a {
    color: #555;

    &:hover {
      color: #333;
    }
  }

  .me-profile {
    border: 2px solid #000;
  }

  .nav {
    background-color: #bbb;
  }

  .menu {
    a {
      color: #000;
    }
  }

  .card {
    background-color: #ccc;
    border: 1px solid #000;
  }

  .card-list {
    .card:last-child {
      border-bottom: 1px solid #000;
    }
  }

  .service {
    .beta {
      box-shadow: -1px 3px 5px rgba(0, 0, 0, .3);
    }
  }

  table.table {
    background-color: #eee;

    tr:nth-child(2n) {
      background-color: #0000000b;
    }
  }

  .tab-card .title {
    border: 1px solid #000;
    border-bottom: none;
  }

  .contact-links a {
    color: #000 !important;
  }
}
