@import '~styles/mixins';
@import '~styles/adminMixins';

.GenericValue {
  max-width: 600px;
  margin-top: $form_spacing;

  &.updatable {
    cursor: pointer;
  }

  &.no-margin {
    margin-top: 0;
  }

  .value {
    margin-top: 5px;
    font-size: 14px;
    white-space: pre-wrap;

    @include baseTableStyle;

    figure {
      max-width: 100%;
      overflow: auto;
    }
  }

  img {
    max-width: 100%;
  }
  .pictures {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    > * {
      margin-top: 10px;
      width: 49%;
    }
  }
  .picture {
    max-width: 350px;
    position: relative;

    &:hover {
      &:before {
        content: '';
        cursor: pointer;
        @include absolute-fill;
        background-color: rgba(255, 255, 255, 0.1);
      }
    }
  }

  .file {
    border: 1px solid $color_border;
    padding: 4px 10px;
    text-align: center;
    background-color: $color-grey-background;
  }

  .object {
    padding: 5px;
    background: rgb(250, 250, 250);
    font-size: 12px;
    white-space: pre-wrap;
  }

  .link {
    color: $color_link;
    display: inline-block;
    @include underline($color_link);
  }

  //Schedule
  .schedule {
    .day {
      margin-top: 4px;

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

      > * {
        @include middle;
        margin-left: 8px;

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

    .day-label {
      font-weight: 600;
      width: 80px;
    }

    .hour {
      opacity: 0.8;
    }
  }

  // Language
  .language-wrapper {
    margin-top: 9px;
    position: relative;
    padding-left: 20px;

    .language-label {
      position: absolute;
      left: 0;
      text-transform: uppercase;
      top: 4px;
      opacity: 0.4;
      font-size: 9px;

      &.textarea {
        top: 5px;
      }
    }

    .language-value {
      min-height: 20px;
      white-space: pre-wrap;
      &.code {
        white-space: initial;
      }
    }
  }

  .color {
    display: inline-block;
    padding: 5px;
    border-radius: 5px;
    font-size: 12px;
  }

  .code {
    white-space: initial;
  }

  .multi {
    .more {
      display: inline-block;
      margin-top: 5px;
      font-size: 12px;
      color: $color_primary;
      cursor: pointer;
      @include underline($color_primary);
    }
  }
}
