@import (reference) "../../../../assets/less/config/variables.less";

#vc_ui-seo-social {
  .vc_column {
    margin-bottom: 15px;
  }

  .wpb-social-net-preview {
    max-width: 527px;

    img {
      display: block;
      width: 100%;
      max-height: 260px;
      object-fit: cover;
    }

    .wpb-social-placeholder-image {
      box-sizing: border-box;
      width: 100%;
      height: 273px;
      background: #F2F3F5;
      display: flex;
      justify-content: center;
      align-items: center;
      text-decoration: underline;
      font-size: 14px;
    }

    p {
      margin: 0;
    }

    .wpb-preview-content {
      padding: 10px;
      background: #F2F3F5;
      font-weight: 500;
      border: 1px solid #E6E7E9;

      .wpb-preview-author {
        color: #93979A;
        font-size: 13px;
        line-height: 22px;

        a {
          text-decoration: none;
          color: #6977A3;
        }
      }

      .vc_social-title {
        font-size: 16px;
        color: #212329;
        line-height: 18px;
      }

      .vc_social-description {
        color: #808186;
        font-size: 12px;
      }
    }
  }

  .wpb_el_type_attach_image {
    display: flex;
    flex-direction: column;
  }

  .truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .line-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .line-clamp-2 {
    -webkit-line-clamp: 2;
  }
}

#vc_ui-seo-general {
  .vc_column {
    margin-bottom: 15px;
  }

  .vc-preview-radio {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 15px;
  }

  .page-preview-container {
    max-width: 640px;
    width: 100%;
    overflow-x: auto;
  }

  .page-preview {
    box-sizing: border-box;
    background-color: #fff;
    box-shadow: rgba(32, 33, 36, 0.28) 0 1px 6px;
    border-radius: 8px;
    max-width: 400px;
    text-align: left;
    margin: 10px 6px;

    &.desktop-view {
      box-shadow: none;
      max-width: 600px;
      padding: 0;
      margin: 0;

      #preview-dots {
        display: none;
      }
    }

    p {
      color: #333;
      font-size: 1em;
      margin: 0;
    }

    .preview-title {
      display: flex;
      align-items: center;
      padding: 16px 6px 0 16px;

      .url-container {
        margin-left: 10px;
        width: calc(100% - 60px);
      }

      .preview-name {
        font-size: 14px;
        line-height: 20px;
      }

      #preview-dots {
        color: #707579;
        width: 22px;
        margin-left: auto;
        cursor: pointer;
      }
    }

    .content-container {
      padding: 0 16px 16px;
    }

    #vc_description-container {
      cursor: pointer;
    }

    #vc_seo-title {
      color: #1558D7;
      font-size: 20px;
      font-weight: normal;
      margin: 12px 0 10px;
      line-height: 26px;
      cursor: pointer;
    }

    #vc_seo-date, #vc_seo-url {
      color: #707579;
    }

    .url-container-inner {
      font-size: 12px;
    }
  }

  .truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .line-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .line-clamp-2 {
    -webkit-line-clamp: 2;
  }

  .line-clamp-4 {
    -webkit-line-clamp: 4;
  }
}

.vc_ui-seo-panel {
  min-height: 100px;
  display: flex;
  flex-direction:column;
  justify-content: flex-start;
  align-items: flex-start;

  .vc_ui-helper-preloader {
    width: 100%;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

// Match the padding used by edit forms.
#vc_ui-panel-post-seo {
  .vc_panel-tab {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .vc_ui-panel-content {
    padding-top: 5px;
    padding-left: 15px;
    padding-right: 15px;
  }
}

.vc_ui-seo-results-section {
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 15px;
  border: 1px solid #BECBD1;
  border-radius: 3px;
}

.vc_ui-seo-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  cursor: pointer;
  user-select: none;

  .vc_ui-seo-results-title {
    color: @textGray;
    font-family: @wpb_font-family-primary;
    font-size: @wpb_font-size-sm;
    font-weight: @wpb_font-weight;
  }
}

.vc_ui-seo-results-toggle {
  display: flex;
  align-items: center;

  &::after {
    content: @vc-c-chevron-down;
    .wpb-icon-font();
    font-size: 8px;
    color: @textGray;
    transform: scaleY(-1);
    transition: transform @wpb_transition_duration_slow ease;
  }
}

.vc_ui-seo-results-body {
  padding: 10px 15px;
  border-top: 1px solid #BECBD1;
}

.vc_ui-seo-results-list {
  margin: 0;
  padding: 0;
  list-style: none;

  > li + li {
    margin-top: 10px;
  }
}

.vc_ui-seo-results-section--collapsed {
  .vc_ui-seo-results-toggle::after {
    transform: scaleY(1);
  }

  .vc_ui-seo-results-body {
    display: none;
  }
}

.vc_ui-seo-results-list-item {
  position: relative;
  font-weight: 500;
  font-size: 12px;
  line-height: 18px;
  padding: 0 0 0 16px;
}

.vc_ui-seo-results-list-item::before {
  content: "";
  border-radius: 50%;
  width: 8px;
  height: 8px;
  position: absolute;
  top: 5px;
  left: 0;
  margin: auto;
}

.vc_ui-seo-results-list-item--problems::before {
  background-color: #FC4242;
}

.vc_ui-seo-results-list-item--warnings::before {
  background-color: #F4AF1D;
}

.vc_ui-seo-results-list-item--success::before {
  background-color: #11C248;
}
