@import "../variables/_all";
@import "../mixins/_all";
@import "./loading";
@import "./list";
@import "./toolbar";
@import "./desc";

.thread-list-toolbar {
  @extend .toolbar;
  .ap-search-wrap {
    overflow: hidden;
  }
  .ap-search-search-icon {
    font-size: 18px;
  }
}

.thread-list-spinning {
  @extend .list-spinning;
}

.thread-list-toolbar-item {
  @extend .toolbar-item;
}

.thread-list {
  overflow: visible;
  .ap-list-more-button {
    border: 1px solid $more-button-color;
    margin: 16px 0;
    padding: 8px;
  }
}

.thread-list-item {
  @extend .list-item;
  position: relative;
  overflow: hidden;
  border: none;
  margin-bottom: 8px;
}

.thread-list-item-image {
  pointer-events: none;
  user-select: none;
  margin-top: 4px;
}

.thread-list-item-inner {
  padding: 8px $thread-list-disclosure-width 8px 8px;
  display: block;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  width: 100%;
  flex-shrink: 1;
  flex-grow: 1;
}

.thread-list-item-body {
  &, &:link, &:visited {
    text-decoration: none;
    color: inherit;
  }
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  flex-grow: 1;
}

.thread-list-item-footer {
  display: block;
}

.thread-list-lead {
  @extend .list-lead;
}

.thread-list-item-title {
  margin: 4px 0;
  font-weight: normal;
  display: block;
  font-size: $thread-list-item-title-font-size;
  line-height: $thread-list-item-title-font-size;
}

.thread-list-item-title-icon {
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
  font-size: 16px;
  line-height: $thread-list-item-title-font-size;
}

.thread-list-item-body {
  display: flex;
  justify-content: flex-start;
}

.thread-list-item-desc {
  @extend .oneline-desc;
  font-size: $thread-list-small-font-size;
  box-sizing: border-box;
  width: 100%;
  display: block;
}

.thread-image {
  display: flex;
  .ap-image-notfound {
    font-size: 12px;
    padding: 0 4px;
  }
}

.thread-image-empty {
  display: none;
}

.thread-image-item {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  max-width: 94px;
  .ap-image {
    overflow: hidden;
  }
  .ap-image {
    background: #FFF;
  }
  &:nth-child(even) {
    .ap-image {
      background: #F0F0F0;
    }
  }
}

.thread-list-item-icon {
  position: relative;
  top: 1px;
}

.thread-list-item-tag {
  display: inline-block;
  padding: 4px;
  color: #AAA;
  &:hover {

  }
  &:active {

  }
}

.thread-list-item-tags {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: $thread-list-small-font-size;
}

.thread-list-item-tag {
  &, &:link, &:visited {
    color: inherit;
  }
}

.thread-list-item-disclosure {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  box-sizing: border-box;
  flex-shrink: 0;
  flex-grow: 1;
  font-size: $disclosure-icon-size;
  color: $disclosure-icon-color;
  position: absolute;
  width: $thread-list-disclosure-width;
  right: 0;
  top: 0;
  bottom: 0;
}

.thread-list-loading {
  @extend .loading;
}

.thread-detail {
  display: block;
}

.thread-detail-header {

}

.thread-detail-body {
  box-sizing: border-box;

  padding-bottom: $thread-detail-footer-height;
}

.thread-detail-footer {
  text-align: center;
  border-top: 1px solid $fixed-footer-border-color;
  background: $fixed-footer-background-color;
  height: $thread-detail-footer-height;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 8;
}

.thread-detail-footer-message {
  text-align: center;
  font-size: 12px;
  color: $light-text-color;
  font-style: italic;
}

.thread-panel {
  background: $dominant-color;
  color: white;
  padding: 8px 0;
  margin: 0 0 8px;
  .thread-panel-container {
    &.ap-container {
      max-width: $container-width;
    }
  }
}

.thread-panel-title {
  display: block;
  font-size: $thread-panel-large-font-size;
  padding: $thread-panel-content-padding;
  line-height: $thread-panel-large-font-size;
}

.thread-panel-title-icon {
  line-height: $thread-panel-large-font-size;
  vertical-align: middle;
  margin-right: 4px;
  font-size: 24px;
}

.thread-panel-desc {
  display: block;
  padding: $thread-panel-content-padding;
}

.thread-panel-meta {
  padding: $thread-panel-content-padding;
  font-size: $thread-panel-small-font-size;
  margin: 0;
  min-height: 16px;
  &.thread-panel-meta-tags {
    margin: 4px 0;
  }
  .thread-panel-meta-tag {
    color: white;
    text-decoration: underline;
    margin-right: 4px;
  }
}

.thread-panel-tag-add-button {
  &.ap-button {
    float: right;
    margin: 0;
    position: relative;
    padding: 4px;
    top: -4px;
  }
}

.thread-panel-button-icon {

}

.thread-panel-actions {
  text-align: right;
  padding: 0 4px;
  margin-top: -8px;
  .ap-button {
    margin: 0;
    padding: 8px;
  }
  .ap-icon-button {
    background: transparent;
    color: white;
    font-size: 12px;
    &:hover {

    }
    &:active {

    }
  }
}

.thread-panel-source {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 14px;
  padding: 4px 8px;
  margin-bottom: 4px;
  color: #AAA;
  img {
    margin-right: 2px;
  }
}

.thread-panel-source-link {
  text-decoration: underline;
}

.thread-panel-source-icon {
  height: 14px;
}

.thread-panel-source-label {
  display: inline-block;
  &:after {
    content: ": ";
  }
}

.thread-link {
  &:link, &:visited {
    color: inherit;
    vertical-align: middle;
    text-decoration: none;
    .link-icon {
      @include circle-shape($thread-link-height);
      display: inline-flex;
      vertical-align: middle;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      margin-right: 1px;
    }
    .link-text {
      text-decoration: underline;
    }
  }
}

.thread-form {
  border-radius: 4px;
  background: white;
  border: 1px solid $slight-border-color;
  padding: 8px;
}

.thread-destroy {
  text-align: center;
}

.thread-panel-social {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 8px;
  margin: 32px 0 0;
  background: rgba(0, 0, 0, 0.33);
  height: 36px;
  box-sizing: border-box;
  > * {
    display: inline-block;
    margin: 0 4px;
  }
}

.thread-card {
  .thread-image {
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
  }
}

.thread-tip {
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  background: white;
  border-radius: 4px;
  border: 1px solid #EEE;
  width: 172px;
  bottom: 36px;
  .card-info-table {
    margin: 0;
    &table {
      display: block;
    }
    thead, tbody, tfoot {
      display: block;
    }
    tr {
      display: flex;
      flex-direction: column;
      flex-wrap: nowrap;
      align-items: flex-start;
      margin-bottom: 8px;
    }
    th{

    }
    td, th {
      display: block;
      text-align: left;
      width: 100%;
      box-sizing: border-box;
      padding: 0;
    }
  }
  .thread-card {
    border: none;
    box-shadow: none;
    margin: 0;
    .card-inner {
      flex-direction: column;
      .card-image-col {
        max-width: 100%;
      }
    }
  }
}

.thread-card-collection-list-container {
  margin: 16px 0;
}

.thread-card-collection-list {
  display: flex;
  justify-content: flex-start;
  overflow: auto;
  flex-wrap: nowrap;
  align-items: center;
  padding: 8px 8px;
}

.thread-card-collection-list-item {
  margin-right: 16px;
  flex-shrink: 0;
  &, &:hover, &:link {
    text-decoration: none;
  }
  .card-info-col {
    display: none;
  }
  .card-col.card-image-col {
    max-width: 240px;
  }
}

.thread-card-collection-list-item-title {
  display: block;
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: $slight-text-color;
  text-align: center;
  box-sizing: border-box;
  padding: 0 8px;
  margin: 0 auto;
}

.thread-card-collection-list-heading {
  font-size: 12px;
  color: $slight-text-color;
  margin: 0 8px;
  font-weight: normal;
  border-bottom: 1px solid $slight-border-color;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.thread-recommend-list {
  margin-top: 64px;
}

.thread-tip-loading {
  @extend .loading;
}

