/*
 *= require codeMirror/codemirror
 *= require_self
 *= require weby_shared
 *= require google/lato
 */

@import "select2";
@import "select2-bootstrap";
@import "dropmic.min";
@import "bootstrap-sprockets";
@import "weby/bootstrap";
@import "bootstrap";
@import "weby-assets";

body {
  background: #F5F5F5;
}

img {
  max-width: 100%;
}

a:hover, a:active, a:focus { text-decoration: none; }

#header {
  padding-top: 25px;
  padding-bottom: 25px;
  font-size: 12px;
  .noperson
  {
    padding-top: 14px;
    padding-bottom: 14px;
    text-align: right;
    .btn { margin-left: 5px; }
  }
  .person,
  .site
  {
    .info
    {
      line-height: 15px;
      margin: 0 10px;
    }
    .info.name
    {
      font-weight: bold;
      text-transform: uppercase;
      margin-top: -3px;
      margin-bottom: 3px;
    }
    .info.actions
    {
      min-width: 80px;
      a.label
      {
        margin-left: 5px;
      }
    }
  }
}

#main {
  &.container, &.container-fluid {
    .nav { }
    .pagination { margin: 10px 0 5px; }
    .form { margin-bottom: 10px; }
    .new-site { margin-left: 5px }
    .search { margin-bottom: 10px; }

    .well
    {
      background: white;
    }
  }
}

.weby-logo {
  max-width: 140px;
}

#footer {
  a
  {
    margin-right: 5px;
    font-weight: bold;
  }
  padding: 10px 0 0;
  text-transform: uppercase;
  text-align: center;
  font-size: 11px;
}

.toggle-styles {
  cursor: pointer;
}

.site-style-group {
  background-color: #ddd !important;
}
 .url-preview {
    font-size: 24px;
    color: #555;
    font-weight: 300;
 }

// turn icon in hand in sort elements
.handle {
  cursor: move;
  color: #1A417E;
  text-decoration: none;
}
// icon on datetimepicker field
.datetimepicker, .datepicker {
  background-image: asset-url("/assets/ic_calendar.png") !important;
  background-position: right 6px center !important;
  background-repeat: no-repeat !important;
  padding-right: 30px;
}

#ui-datepicker-div {
  font-size: 0.9em;
  z-index: 10 !important;
}

.select2-search-field input {
  height: 18px;
}

select.select2 {
  height: 34px;
}

.search-user-results {
  height: 300px;
  overflow: auto;
}

.users_list {
  padding-top: 10px;
}

.pagination {
  margin: 10px 0;
}

.pagination select {
  -moz-border-radius: 0px;
  -webkit-border-radius: 0px;
  border-radius: 0;
  float: left;
  border-color: #DDD;
}

.pagination select.small {
  height: 26px;
}
// required is red!
label.required abbr { color: #BC1625; }

label.mce-label { max-width: none }

// nowrap tables
table.nowrap {
  td {
    > div {
      overflow: hidden;
      white-space: nowrap;
    }

    &.actions > div {
      overflow: visible;
      display: inline-block;
    }
  }

  tr {
    td > div {
      white-space: nowrap;
    }

    &:hover {
      td > div {
        white-space: normal;
      }
    }
  }
}

table {
  td p {
    margin: 0;
  }
  .label {
    font-size: 92%;
    margin-bottom: 5px;
    display: inline-block;
  }
  &.table {
    th.grab-header {
      width: .2%;
    }
    td.grab-cell {
      padding: 4px 0 4px 4px;
      vertical-align: middle;
    }
  }
  .sel-all {
    width: .2%;
  }
  .sel-item {
    padding-left: 4px;
  }
  .actions {
    padding: 4px;
    vertical-align: middle !important;
    text-align: right;
  }
}

table.align-middle {
  > tbody > tr > td, > thead > tr > th {
    vertical-align: middle;
  }
}

.space-top {
  margin-top: 27px;
}

thead {
  margin-top: 5px;
  background-color: white;
}

[name=select_all], [name=select_item] {
  width: 15px;
  height: 15px;
}

.add-subitem img {
  width: 18px;
}

.publish-warning {
  margin-left: 4px;
  i {
    vertical-align: top;
    font-size: 20px;
  }
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  z-index: 66000;
}

.modal {
  z-index: 66050;
}

.select2-drop {
  z-index: 66055;
}

.select2-drop-mask {
  z-index: 66052;
}

.tabbable.i18n .nav.nav-tabs {
  margin-bottom: 0px !important;
  > li > a {
    font-size: initial;
  }
}

.tabbable.i18n .tab-content {
  border: 1px solid #DDD;
  border-top: 0;
  margin-bottom: 20px;
  -moz-border-radius-bottomleft: 4px;
  -moz-border-radius-bottomright: 4px;
  -webkit-border-bottom-left-radius: 4px;
  -webkit-border-bottom-right-radius: 4px;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.i18n .tab-pane {
  padding: 12px;
}

.optional {
  margin-left: 0px !important;
}

.highlight:hover td {
  background-color: #EEE !important;
}

.cursor, .cursor label {
  cursor: pointer;
}

.action-link, .handle {
  white-space: nowrap;
}

.caption .action-link {
  margin-right: 4px;
  margin-bottom: 2px;
  display: inline-block;

  &:last-child {
    margin-right: 0;
  }

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

#preview-css-panel {
  text-align: center;

  iframe {
    width: 100%;
    height: 450px;
    border: 2px solid #DDD;
  }
}
// to customize main menu
#menu-admin {
  .nav-header {
    padding: 0;
    li {
      font-weight: bold;
    }
  }

  li i {
    margin-right: 2px;
  }
}

.menu-tabs {
  .list-group-item {
    padding: 8px 8px 8px 3px;
    display: flex;
    align-items: center;

    > a {
      flex: 1;
      color: inherit;
    }
  }

  .handle {
    width: 10px;
    margin-right: 8px;
  }
}

.add-menu {
  text-align: right;
  margin-bottom: 10px;
}

#repo_list > div.row > div > div {
  height: 270px;
}

#repo_list > div.row > div > div > a > img {
  height: 160px;
  background-color: #F5F5F5;
}

.album-photo {
  position: relative;
  margin: 20px 0;
  img.preview {
    height: 150px;
    width: 100%;
    object-fit: cover;
    border: 1px solid #333;
  }
  .form-group {
    padding-right: 0;
  }
  .file-name {
    word-wrap: break-word;
  }
  .cover-label {
    position: absolute;
    left: 5px;
    top: 5px;
    font-size: 14px;
  }
  .make-cover {
    display: none;
  }
  &:hover {
    .make-cover {
      display: inline-block;
    }
  }
  .close {
    border-radius: 50%;
    color: #333;
    background: rgba(255, 255, 255, 0.85);
    position: absolute;
    right: 1px;
    top: 1px;
    float: none;
    display: inline-block;
    width: 34px;
    height: 34px;
    line-height: 30px;
    opacity: 1;
    text-shadow: none;
    text-align: center;
    box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.1);
    &:hover {
      background: rgba(255, 255, 255, 0.95);
    }
  }
}

#theme-tabs {
  margin-bottom: 15px;
  margin-top: 10px;

  li {
    height: 100%;

    a {
      height: 100%;

      > div {
        text-align: center;
        font-size: 18px;
        height: 30px;
      }
    }

    &.active {
      a > div {
        font-weight: bold;
      }
    }

    &.current {
      a > div {
        font-size: 20px;
      }
    }
  }

  .skin-tooltip {
    position: absolute;
    top: 73px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 8px 3px #fff;
    pointer-events: none;
  }
}

//available components
div#available_components div > div.thumbnail {
  height: 245px;
}

div#available_components div > div.thumbnail .glyphicon {
  color: white;
}

div#available_components div > div.thumbnail h5{
  height: 30px;
}

div#available_components div > div.thumbnail img {
  height: 130px;
}

.selected-component {
  font-size: 2rem;
  color: #444;

  &.empty {
    font-size: initial;
    font-style: italic;
  }
}

// used to mark object as published/unpublished
.deactivated, .deactivated > td {
  background-color: #F2DEDE !important;
}
.activated {
  background-color: #DFF0D8 !important;
}

input[type=checkbox] {
  margin: 3px 0 0;

  &.toggle, &.sel-item {
    margin-top: 0;
  }
}

.nav-header {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: bold;
  line-height: 20px;
  color: #999;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}
.nav > li > a {
  position: relative;
  display: block;
  padding: 6px 12px;
}
//Form-actions
.form-actions {
  padding: 19px 20px 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  background-color: #f5f5f5;
  border-top: 1px solid #e5e5e5;
  > a {
    margin-right: 9px;
    &:last-child {
      margin-right: 0;
    }
  }
}
.form-group {
  margin-top: 10px;
  margin-bottom: 10px;
  margin-left: 0px !important;
  padding-right: 10px;
  label {
    //font-weight: bold !important;
  }
}
.form-control{
  &.sm {
    max-width: 120px;
  }
}
//Paginator
.pagination > li {
  float: left;
}
//alert
.alert {
  margin-top: 10px;
}
//checkboxes
.well .nav .checkbox {
  font-weight: normal;
}

.radio + .radio, .checkbox + .checkbox {
  margin-top: 0;
}

.checkbox label {
  /*padding-left: 5px;*/
  display: inline-block;

  > input {
    margin-left: -20px !important;
    width: 15px;
    height: 15px;
  }
}

.right-checkbox {
  .checkbox-label {
    margin-left: 8px;
  }
}

table .checkbox label,
#backup .checkbox label {
  padding-left: 22px;
}

.center {
  text-align: center;
}

div.align-middle {
  display: flex;
  align-items: center;
}

.image_tag {
  background-color: #DDD;
  padding: 10px;
  display: inline-block;
  margin-bottom: 7px;
}

.contrast_image_tag {
  background-color: #888;
  padding: 10px;
  display: inline-block;
  margin-bottom: 7px;
}

#repo_list {
  margin-top: 10px;
}

.img-edit .panel-heading.closed {
  cursor: pointer;
}

.img-edit .panel-heading.open {
  cursor: default;
}

.img-edit-preview {
  margin-bottom: 10px;
}

.breadcrumb {
  margin-bottom: 10px;
}

hr {
  margin-bottom: 0;
}

.unread {
  font-weight: bold;
}

#dashboard {
  .box {
    /*height: 210px;*/
  }
  #calendar h2 {
    font-size: 18px;
  }
}

.color-pick-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 440px;
  padding: 0 20px;
}

.color-pick-option {
  padding: 10px;
  position: relative;

  input {
    position: absolute;
    opacity: 0;

    &:checked + label {
      border: 1px solid white;
      box-shadow: 0 0 8px 5px rgba(0,0,0,.3);

      &:before {
        content: '✓';
        color: #fff;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 35px;
      }
    }
  }

  label {
    border-radius: 50%;
    width: 45px;
    height: 45px;
    margin: 0;
    cursor: pointer;
  }
}

.notify-info {
  position: fixed;
  background-color: rgba(255, 255, 255, .9);
  padding: 10px;
  border-radius: 5px;
  transition: .2s;
  transform: translateY(5px);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 4px 2px rgba(0,0,0,.2);

  &.visible {
    opacity: 1;
    transform: none;
  }
}

////Custom nav tabs
.nav-tabs {
  border-color: #AAA;

  > li {

    > a {
      font-size: 18px;
    }

    &.active {
      > a, > a:hover, > a:focus {
        border-color: #AAA;
        border-bottom-color: transparent;
      }
    }
  }
}

.toastui-editor-defaultUI-toolbar .scroll-sync:before {
  content: 'Rolar' !important;
}

.tab-content {
  padding-top: 15px;
}

.flex-row {
  display: flex;

  &.center-align {
    align-items: center;
  }

  > * {
    margin: 0 5px;
    &:first-child {
      margin-left: 0
    }
    &:last-child {
      margin-right: 0
    }
  }

  .cell {
    flex: 0 0 auto;
  }
  .cell-20 {
    flex: 0 0 20%;
  }
}

.sticky-bottom {
  position: sticky;
  bottom: 4px;
}

.bulk-actions {
  overflow: hidden;
  box-sizing: content-box;
  display: block;
}

.bulk-actions-container {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 20px 6px 6px;
  box-shadow: 1px 1px 4px rgba(0,0,0,.05);
  border-radius: 4px;
  position: relative;

  small {
    color: #797979;
    position: absolute;
    top: 2px;
    text-transform: uppercase;
  }
}

.dropmic-menu {
  text-align: left;
  font-weight: normal;
  z-index: 3;
  font-size: 14px;
  a {
    display: block;
    padding: 5px 8px;

    &:hover {
      background-color: #F2F2F2;
    }
  }
}

.dropmic::after, .dropmic::before {
  z-index: 3;
}

button[data-dropmic-btn] {
  outline: 0;
  border: 0;
  background-color: transparent;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 27px;
  width: 27px;
  transition: transform .15s cubic-bezier(.175,.885,.32,1.275);

  i {
    font-size: 16px;
    color: #646970;
  }

  &:hover, .dropmic--show & {
    background-color: #e8e8e8;

    i {
      color: #3c434a;
    }
  }

  .dropmic--show & {
    transform: rotate(90deg);
  }
}

.menu-footnote {
  margin-bottom: 15px;
  color: #999;
  font-size: 13px;
  text-transform: none;
}