
body {
  /* Override of bootstrap styles */
  background-color: #f1f1f1;
}

h3, .h3 {
  font-size: 22px!important;
}

h4.title {
  font-size: 20px!important;
  padding-bottom: 2px;
  border-bottom: 1px dotted #ccc;
}

ol, ul {
  margin-bottom: 0;
}

/*
dd:last-child, li:last-child {
  margin-bottom: 2px;
}
*/

.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus {
  background-color: #f0f0f0;
}

.navbar-inner-tab {
  margin-top: 1em;
  margin-bottom: 0px;
}

code, kbd, pre, samp {
  font-family: Menlo,Monaco,Consolas,"Courier New",monospace;
}

#message {
  display: none;
  
  ul {
    margin-top: 5px;
    margin-bottom: 5px;
  }
}

code, code.cdbt-clipboard {
  padding: 2px 4px;
  font-size: 90%;
  color: $code-string;
  background-color: $code-back;
  border-radius: 4px;
}

pre, pre.cdbt-clipboard {
  display: block;
  padding: 9.5px;
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.42857143;
  color: $code-string;
  word-break: break-all;
  word-wrap: break-word;
  background-color: $code-back;
  border: 1px solid #ccc;
  border-radius: 4px;
}

fieldset>label {
  font-weight: 400!important;
}

.inline-help {
  margin-top: 7px;
  margin-bottom: 8px;
  text-indent: 1.5em;
}

.label-default {
  background-color: $default;
}
.label-primary {
  background-color: $primary;
}
.label-success {
  background-color: $success;
}
.label-info {
  background-color: $info;
}
.label-warning {
  background-color: $warning;
}
.label-danger {
  background-color: $danger;
}
.label-required {
  position: relative;
  margin-left: .5em;
  top: -1px;
  background-color: #ce4844;
}

.nt {
  color: $nt;
}

.input-mini {
  width: 100px;
}

a.note-link {
  font-size: inherit;
  text-decoration: none;
  color: $text-warning;
  
  i,span {
    font-size: inherit;
    margin-top: 2px;
  }
}

.foot-note {
  margin-top: 10px;
  margin-left: -1em;
  font-size: 90%;
  
  li {
    color: $text-warning;
    margin: 0 0 10px;
  }
  
  li i,span {
    color: $text-warning;
    font-size: inherit;
  }
}

div.plugin-meta {
  position: absolute;
  top: 23px;
  right: 28px;
  font-size: 14px;
}

.sql-support-button {
  position: absolute;
  top: 10px;
  right: 15px;
}

.operate-table-btn-group {
  margin-right: 10px;
}

.operate-data-btn-group {
  margin-left: 10px;
}

.cdbt-repeater-row {
  th {
    position: relative;
  }
  
  td:first-child {
    position: relative;
    
    .cdbt-repeater-left-main, .cdbt-repeater-left-sub {
      position: absolute;
      display: table-cell;
      top: 2px;
      left: 28px;
    }
    
    .cdbt-repeater-left-sub {
      display: table-cell;
      top: 26px;
      overflow: hidden;
    }
  }
  
  &:hover {
    border: solid 2px #e75353;
    border-width: 2px 2px 2px 1px;
    
    &:first-child {
      border-top-width: 2px;
    }
  }
}

#cdbtAdminTables, 
#cdbtWpCoreTables, 
#cdbtShortcodes, 
#cdbtAllowedHosts {
  
  .repeater-list-heading {
    display: table-cell;
    background: none!important;
    background-color: transparent!important;
    
    &:hover {
      background: none!important;
      background-color: transparent!important;
    }
    
    &.sorted {
      background-color: $info!important;
      color: #fff!important;
      
      &:hover {
        background-color: $info!important;
        color: #fff;
      }
    }
    
    span.glyphicon {
      display: block;
      position: absolute;
      top: 8px;
      right: 4px;
      float: right!important;
    }
    
  }
}

#cdbtAdminTables, 
#cdbtWpCoreTables {
  th {
    display: table-cell;
    vertical-align: middle;
  }
  
  td {
    display: table-cell;
    vertical-align: middle;
    
    &:first-child {
      display: table;
    }
  }
  
  .col-tl-tablename { width: 240px; }
  .col-tl-records { width: 80px; }
  .col-tl-pk { width: 160px; }
  .col-tl-charset { width: 100px; }
  .col-tl-collation { width: 160px; }
  .col-tl-engine { width: 100px; }
  .col-tl-ppr { width: 100px; }
  .col-tl-operation { min-width: 200px; max-width: 100%; }
  
  td.col-tl-records, td.col-tl-ppr { text-align: right; }
  td.col-tl-operation { text-align: center; }
  
  .tl-operation-buttons {
    margin: 0;
    width: 180px;
  }
  
}

#cdbtShortcodes {
  
  th {
    display: table-cell;
    vertical-align: middle;
    height: 50px;
  }
  
  td {
    display: table-cell;
    vertical-align: middle;
  }
  
  .col-scl-id { width: 80px; text-align: center; }
  .col-scl-name { width: 300px; }
  .col-scl-desc { min-width: 200px; }
  .col-scl-type { width: 100px; }
  .col-scl-author { width: 120px; }
  .col-scl-permission { width: 120px; }
  .col-scl-operation { width: 104px; }
  
  td.col-scl-type, td.col-scl-operation { text-align: center; }
  
}

#cdbtAllowedHosts {
  display: table;
  
  th {
    display: table-cell;
    height: 50px;
    
    div.repeater-list-heading {
      display: block;
      width: inherit;
      height: inherit;
      border: 0;
      border-left: solid 1px #ddd;
      background-color: transparent!important;
      
      &:hover {
        background-color: transparent;
      }
    }
  }
  
  td {
    display: table-cell;
    vertical-align: middle;
  }
  
  .col-ahl-id { width: 80px; }
  .col-ahl-name { width: 200px; }
  .col-ahl-apikey { min-width: 240px; }
  .col-ahl-permission { width: 160px; }
  .col-ahl-generated { min-width: 180px; }
  .col-ahl-operation { width: 54px; }
  
  td.col-ahl-id, td.col-ahl-operation { text-align: center; }
  
}

nav#operation-navbar {
  margin-top: 1em;
  margin-bottom: 1em;
}

.table-responsive {
  
  strong {
    display: block;
    padding: 5px;
  }
  
  table#columns-detail {
    
    thead th {
      vertical-align: middle;
      word-wrap: normal;
      word-break: keep-all;
    }
    
    tbody td {
      vertical-align: middle;
    }
  }
  
  table#table-detail {
    width: calc(100% - 3px);
    table-layout: fixed;
    
    tbody th {
      padding-left: 1em;
    }
    
    tbody>tr>th:first-child {
      border-left: solid 1px #ddd;
    }
    tbody>tr>td {
      border-right: solid 1px #ddd;
    }
  }
}

.sub-description-title {
  display: inline-block;
  margin: 6px 8px 0 6px;
}

.checkbox.highlight, .checkbox-custom.highlight {
  background-color: transparent;
}

.debug-section {
  padding-left: 30px;
  padding-right: 30px;
}

.switching-item {
  position: absolute;
  display: none;
}

.cdbt-wizard-content {
  
  div.pull-left {
    margin: 0.5em 1.5em 1.5em 0;
    text-align: left;
  }
  
  div.pull-right {
    margin: 0.5em 0 1.5em 1.5em;
    text-align: right;
  }
  
  .cdbt-short-trip-img {
    width: auto;
    height: auto;
    max-width: 480px;
    max-height: 240px;
    border: solid 1px #ddd;
  }
  
  .paragraph-ja {
    text-indent: 1em;
  }
  
  .contribute-extends {
    text-indent: 1em;
    
    li {
      text-indent: 0;
      
      &:after {
        content: '/';
        color: $default;
      }
      
      &:last-child:after {
        content: '';
      }
    }
  }
}

.donate-info {
  
  .noteworthy {
    clear: both;
    margin: .25em auto .75em;
    text-align: center;
    
    a {
      &:link, &:hover, &:active, &:visited {
        text-decoration: none;
        color: #fff;
      }
    }
    
    .cdbt-btn-group {
      display: table-row;
      width: inherit;
      margin: 0;
      padding: 0;
      color: #fff;
      font-weight: 600;
      
      &:hover, &:active, &:focus {
        box-shadow: 0 0 2px 3px $primary!important;
      }
      
      .btn-left {
        display: table-cell;
        width: 30px;
        line-height: 30px;
        border-radius: 3px 0 0 3px;
        vertical-align: middle;
        text-align: center;
      }
      .btn-right {
        display: table-cell;
        width: auto;
        line-height: 30px;
        padding-left: .5em;
        padding-right: .75em;
        border-radius: 0 3px 3px 0;
        vertical-align: middle;
        text-align: center;
      }
      
      &.cdbt-twitter {
        background-color: #00aced;
        .btn-right { background-color: #52c4ef; }
      }
      &.cdbt-facebook {
        background-color: #305097;
        .btn-right { background-color: #4a70c6; }
      }
      &.cdbt-review {
        background-color: #db4a39;
        .btn-right { background-color: #f9866b; }
      }
      &.cdbt-official {
        background-color: #27ae60;
        .btn-right { background-color: #7c7c7c; }
      }
      
    }
  }
  
  .donate-links {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-around;
    
    li {
      display: table-cell;
      width: 257px;
      vertical-align: middle;
      text-align: center;
      
      &.donate-coinbase {
        padding-top: 10px;
      }
    }
  }
}

#collapse-reference {
  cursor: pointer;
  
}

.form-group label {
  text-align: left!important;
  padding-left: 26px;
  
  span.label {
    margin-left: .75em;
  }
}

.inner-preview {
  width: 100%;
  height: auto;
  padding: 8px;
  word-break: break-all;
  word-wrap: break-word;
  border: solid 1px #ddd;
  border-radius: 4px;
  background-color: #e8e8e8;
}

.cdbt-clipboard {
  background-color: inherit;
  color: inherit;
  
  &.cdbt-copied {
    background-color: $primary;
    color: #fff;
  }
  
  &.no-focus.cdbt-copied {
    background-color: inherit;
    color: inherit;
  }
}

.addons-section {
  padding: 0 9px;
  
  .addons-list {
    
    li {
      vertical-align: top;
      
      .thumbnail {
        min-width: 242px;
        
        img {
          width: 100%;
          max-width: 232px;
          height: auto;
          max-height: 200px;
          background-color: #e8e8e8;
          
        }
        
        .caption {
          
          .addon-title {
            margin-top: 15px;
          }
          
          .addon-description {
            word-wrap: break-word;
            word-break: normal;
            white-space: normal;
            overflow: hidden;
            height: 6em;
            border-bottom: 1px dotted #d1d1d1;
          }
          
          .addon-version, .addon-author {
            text-align: right;
            border-bottom: 1px dotted #d1d1d1;
            
            label {
              color: #919497;
              font-weight: 400;
            }
          }
          
          .addon-footer {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            justify-content: space-between;
            align-items: center;
            
            .add-btn {
              text-align: left;
            }
            
            .addon-amount {
              text-align: right;
            }
          }
        }
      }
    }
  }
  
  .addon-message {
    width: 100%;
    margin-top: 3em;
    text-align: center;
    color: #a2a2a2;
    font-size: 19px;
  }
}
