// import crowi variable
@import 'utilities';

// import bootstrap
@import 'bootstrap';

@import "fontawesome";
@import "fa-brands";
@import "fa-regular";
@import "fa-solid";

// crowi component
@import 'layout';
@import 'page';
@import 'page_list';
@import 'form';
@import 'wiki';
@import 'admin';
@import 'comment';
@import 'user';
@import 'portal';
@import 'search';
@import 'attachments';
@import 'share';
@import 'tree';


ul {
  padding-left: 18px;
}


.meta {
  margin-top: 0;
  padding: 16px;
  color: #666;
  border-top: solid 1px #ccc;
  background: #f0f0f0;
  font-size: 0.95em;
  color: #888;

  .picture {
    width: 16px;
    height: 16px;
  }
}

.page-meta {
  margin-bottom: 0;
}

.help-block {
  font-size: .9em;
}

header nav ul img {
  vertical-align: middle;
}

footer, aside {
  h4:first-child, h3:first-child {
    margin-top: 0;
  }

  h4 {
    font-size: 1.1em;
  }
}


.form-element {
  margin-bottom: 1em;
}

footer {
  h4,
  h3 {
    margin-bottom: 0.5em;
    font-weight: normal;

    &:first-child {
      margin-top: 0;
    }
  }

  p {
    margin: 0.3em 0 0.5em 0;

    &:first-child {
      margin-top: 0;
    }
  }
}

.modal-backdrop {
  z-index: 1060;
}
.modal {
  z-index: 1061;
  p {
    font-size: 1em;
  }

  h3, h4 {
    font-size: 18px;
    margin: 0;
  }
}
.modal-body.alert {
  margin-bottom: 0;
  border-radius: 0;
}

.modal.create-page {
  .modal-body {
    h3, h4 {
      margin-bottom: 10px;
    }

    form {

      input.form-control {
        border: none;
        box-shadow: none;
        border-bottom: dotted 1px #444;
        border-radius: 0;
        padding: 6px;
        height: 34px;
        font-weight: bold;
        background: #f0f0f0;

        &:focus {
          background: #ddd;
        }
      }

      .page-name-addons {
        position: absolute;
        top: 7px;
        left: 27px;
      }
      .page-today-prefix {
        display: inline-block;
      }
      .page-today-input1 {
        width: 60px;
        padding-left: 2px;
        padding-right: 2px;
        display: inline-block;
      }
      .page-today-suffix {
        display: inline-block;
      }
      .page-today-input2 {
        width: 100%;
        display: inline-block;
      }
    }
  }
}

.popular-page-high {
  color: #e80000;
  font-size: 1.1em;
  font-weight: bold;
}
.popular-page-mid {
  color: #e47800;
  font-weight: bold;
}
.popular-page-low {
  color: #ab7c7c;
}


// {{{ add badge variation
.badge-default {
  @include label-variant($label-default-bg);
}
.badge-primary {
  @include label-variant($label-primary-bg);
}
.badge-success {
  @include label-variant($label-success-bg);
}
.badge-info {
  @include label-variant($label-info-bg);
}
.badge-warning {
  @include label-variant($label-warning-bg);
}
.badge-danger {
  @include label-variant($label-danger-bg);
}
// }}}

.dropdown-menu {
   z-index: 10060;
  .dropdown-button {
    padding: 3px 20px;
  }
}

.notif {
  a {
  }

  .badge {
    position: absolute;
    top: 6px;
    right: 1px;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: normal;
  }
}

.dropdown-menu {
  li {
    a {
      padding: 5px 20px;
    }
  }
}

// user picture
.picture {

  // 通常サイズ
  width: 24px;
  height: 24px;

  // size list
  &.picture-lg {
    width: 48px;
    height: 48px;
  }
  &.picture-sm {
    width: 16px;
    height: 16px;
  }
  &.picture-xs {
    width: 12px;
    height: 12px;
  }

  // design option
  &.picture-sq {
    border-radius: 2px;
    border: solid 1px #ccc;
  }
  &.picture-rounded {
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0,0,0,.3);
  }
}

.highlighted {
  color: #333;
  background-color: rgba(255,255,140,0.5);
  border-radius: 3px;
}

// adjust
// this is for diff2html. hide page name from diff view
.d2h-file-header {
  display: none;
}

// components
.flip-container { // {{{
  perspective: 1000;

  .flipper {
    .front, .back {
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      transition: 0.4s;
      -webkit-transform-style: preserve-3d;
      transform-style: preserve-3d;
    }

    .front {
      z-index: 2;
    }

    .back {
    }

    .back,
    &.to-flip .front {
      -webkit-transform: rotateY(180deg);
      transform: rotateY(180deg);
    }

    &.to-flip .back {
      -webkit-transform: rotateY(0);
      transform: rotateY(0);
    }
  }
}

// buttons
.btn-primary {
}
$btn-google-color: rgb(204,89,71);
.btn-google {
  @include button-variant(lighten($btn-google-color, 50%), $btn-google-color, darken($btn-google-color, 20%));
}
$btn-github-color: rgb(68,68,68);
.btn-github {
  @include button-variant(lighten($btn-github-color, 50%), $btn-github-color, darken($btn-github-color, 20%));
}


input.searching {
  background: #fff url(/images/loading_s.gif) right no-repeat;
}
.search-list {
  padding: 0;

  li {
    list-style: none;
  }
  .list-link {
    padding-bottom: 5px;
    a {
      display: block;
      word-break: break-all;
      font-weight: bold;
      text-decoration: none;
      span {
        font-weight: normal;
      }
      &:hover {
        background: #f0f0f0;
        color: #666;
      }
    }
    .search-description {
      font-size: .8em;
      color: #999;
    }
  }

  .next-link {
    a {
      display: block;
      text-align: center;
    }
  }
}

// notification
.fk-notif {
  bottom: 0;
  left: 0;
  width: 100%;
  position: fixed;
  z-index: 1029;
  padding: 10px;
  box-shadow: -1px 0 3px 0px #666;
  font-weight: bold;
  transition: all .3s;

  &.fk-notif-danger {
    background: #b94a48;
    color: #fff;

    a {
      color: #f5ecf4;
      text-decoration: underline;
      &:hover {
        text-decoration: none;
      }
    }
  }

  &.fk-notif-warning {
    background: #fcf8e3;
    color: #8a6d3b;
  }
}
.on-edit .fk-notif {
  bottom: 50px;
  z-index: 1061;
}

// external-services
.crowi {
  .github-link {
    background: #e5f6f8;
    padding: 1px;
    border-radius: 3px;
    display: inline-block;
    border: solid 1px #ccc;
    color: #555;
    text-decoration: none;

    &:hover {
      background: #afdadf;
    }
  }
}

.fullscreen-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 9999;
  opacity: 0;
  -webkit-transition: opacity .3s ease-out;
  -moz-transition: opacity .3s ease-out;
  transition: opacity .3s ease-out;

  & > * {
    box-shadow: 0 0 20px rgba(0, 0, 0, .8);
  }
}
.overlay-on {
  .container-fluid,
  .crowi-header {
    -webkit-filter: blur(5px);
    -moz-filter: blur(5px);
    filter: blur(5px);
  }

  .fullscreen-layer {
    opacity: 1;
    height: 100%;
  }
}

#presentation-container {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90%;
  background: #000;

  iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }
}



// import
@import '../../node_modules/highlight.js/styles/tomorrow-night.css';
@import '../../node_modules/diff2html/dist/diff2html.css';
