.radio-player-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;

  &, * {
    box-sizing: border-box;
  }

  &-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eaeaea;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    background: #fff;
    width: calc(100% + 20px);
    margin-left: -20px;
    margin-bottom: 20px;
    position: sticky;
    top: 32px;
    z-index: 9;

    .header-title {
      font-size: 1.2rem;
      font-weight: 500;
      display: flex;
      align-items: center;

      svg {
        margin-right: 10px;
        width: 35px;
      }

    }


  }

  &-menu {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    width: 20%;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 110px;

    .menu-item {
      cursor: pointer;
      padding: 15px;
      border-bottom: 1px solid #eaeaea;
      color: #5C637E;
      font-size: 1rem;
      display: flex;
      align-items: center;
      border-right: 4px solid transparent;

      .settings-icon {
        width: 24px;
        height: 24px;
        margin-right: 10px;
      }

      &.active {
        color: $radio_player_color_dark;
        border-right-color: $radio_player_color;
        font-weight: 600;

        svg, path {
          fill: $radio_player_color_dark;
        }

      }

      &.tools {
        svg {
          width: 22px;
          height: 22px;
        }
      }

    }

    @media (max-width: 1199px) {
      width: 33%;
    }

    @media (max-width: 767px) {
      position: relative;
      top: 0;
      width: calc(100% - 10px);
      max-width: 100%;
      margin-bottom: 20px;
    }

  }

  .tab-content {
    display: flex !important;
    flex-direction: column;
    margin: 0 15px;
    border-radius: 5px;
    background: #fff;
    flex: 1;
    padding: 15px 20px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;

    .settings-header {
      display: flex;
      align-items: center;
      border-bottom: 1px solid #eaeaea;
      margin-bottom: 20px;
      padding: 10px 0 20px 0;
      line-height: 1;

      img {
        margin-right: 10px;
        width: 24px;
        height: 24px;
      }

      span {
        font-size: 1rem;
        font-weight: 600;
      }
    }

    .pro-addon-modal {
      position: absolute;
      top: 60px;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 2;
      display: flex;
      justify-content: center;
      min-height: 500px;
      border-bottom-left-radius: 5px;
      border-bottom-right-radius: 5px;

      .modal-inner {
        background: #fff;
        padding: 30px 20px;
        border-radius: 7px;
        max-width: 500px;
        width: 100%;
        text-align: center;
        position: relative;
        height: max-content;
        margin: 40px auto;

        h2 {
          margin-top: 0;
          font-size: 1.2rem;
          font-weight: 600;
          margin-bottom: 25px;
        }

        img {
          max-width: 100%;
          border-radius: 7px;
        }

        p {
          font-size: 1rem;
          margin-bottom: 20px;
          color: #5C637E;
        }

        .button {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          background: $radio_player_color;
          color: #fff;
          border-radius: 5px;
          cursor: pointer;
          text-decoration: none;
          transition: all .3s ease;
          font-size: 1rem;
          border: none;
          padding: 7px 10px;
          height: 40px;

          i {
            margin-right: 10px;
          }

          &:hover {
            background: $radio_player_color_dark;
          }
        }
      }

    }

  }

  .setting-field {
    display: flex;
    margin-bottom: 15px;
    background-color: #F7F8FA;
    border-radius: 10px;
    padding: 15px;

    &-label,
    label {
      font-weight: 500;
      margin-right: 1rem;
      font-size: 14px;
      width: 25%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 4px;
      max-width: 300px;
      min-width: 200px;

      &:after {
        content: ":";
        margin-left: auto;
      }
    }

    &-content {
      display: flex;
      flex-flow: column;
      flex: 1;

    }

    &-sub {
      display: flex;
      flex-flow: column;
      margin-top: 10px;

      .setting-field {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
        border: 1px dashed #ddd;
      }

      .setting-field-label {
        margin-top: 0;
        margin-bottom: .5rem;
        width: auto;

        &:after {
          display: none;
        }
      }
    }

    .input-group {
      display: inline-flex;
      flex-flow: column;
      flex: 1;
      width: max-content;

      &.disabled {
        opacity: .7;

        &.pro-disabled {
          & > * {
            pointer-events: none;
          }
        }

      }
    }

    .description {
      margin-top: .5rem;
      font-size: .8rem !important;
      color: #777;
    }

    button {
      width: max-content;
    }

    .components-base-control__field {
      margin-bottom: 0;
    }

    &.custom-css {
      padding: 0;
      background: transparent;
      flex-direction: column;
      align-items: flex-start;
      margin-bottom: 1.5rem;

      label {
        width: auto;
        margin-bottom: 10px;

        &:after {
          display: none;
        }
      }

      .description {
        margin-top: 5px;
        margin-bottom: 10px;
      }

      .setting-field-content {
        margin: 0;
        width: 100%;
      }

      .CodeMirror-scroll {
        max-width: 100%;
        border-radius: .5rem;
        border: 1px solid #ddd;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
        padding: 0;

        &, * {
          box-sizing: border-box;
        }
      }
    }

    &.popup-size {
      .components-range-control {
        margin-bottom: 15px;

        label {
          margin-bottom: 0;
          font-size: 12px;

          &:after {
            display: none;
            width: auto;
          }
        }
      }
    }

    &.exclude-field {

      .input-group {
        width: 100%;
      }

      .exclude-field-input {
        display: flex;
        flex-direction: column;
      }

      .exclude-field-all {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-top: 15px;
        flex-wrap: wrap;

        & > div {
          display: flex;
          align-items: center;

          &:first-child {
            margin-right: 20px;
          }
        }

        &-label {
          margin-right: 10px;
          font-weight: 500;
          font-size: .875rem;
        }

        .description {
          width: 100%;
          text-align: left;
          line-height: 1.5;
        }
      }


      @media (max-width: 1199px) {
        .exclude-field-all {
          flex-direction: column;
          align-items: flex-start;

          & > div {
            margin-bottom: 10px;
            width: 100%;

            span {
              white-space: nowrap;
            }
          }
        }
      }

    }

    &.field-editor {
      flex-direction: column;
      align-items: flex-start;

      .setting-field-label {
        width: auto;
        min-width: auto;

        &:after {
          display: none;
        }
      }

      .setting-field-content {
        width: 100%;

        .description {
          margin-bottom: 15px;
        }

        .content-editor {
          width: 100%;
          border: none;
          box-shadow: none;

          &-wrap {
            &.disabled {
              opacity: .7;

              .wp-editor-wrap {
                pointer-events: none;
              }
            }
          }

        }

      }
    }

    &.field-minimize-player-image {
      .thumbnail-uploader-wrap {
        flex-direction: row;
        align-items: center;
      }
    }

    .radio-player-range-control {
      &.disabled {
        opacity: .7;
      }
    }

    .thumbnail-uploader-wrap {
      display: flex;
      flex-direction: column;

      .thumbnail-actions {
        display: flex;
      }

      input {
        width: 300px;
      }

      button {
        margin-left: 15px;
        display: flex;
        align-items: center;
        background: #FFF;
        border-radius: 7px;
        height: 40px;

        &.radio_player_select_img {
          color: $radio_player_color;
          border: 1px dashed rgba(#5CB85C, .5);

          &:hover {
            background: #D5F0DB;
          }
        }

        &.radio_player_delete_img {
          color: #FF8000;
          border: 1px dashed rgba(#FF8000, .5);

          &:hover {
            background: #FFD8B3;
          }
        }

        i {
          width: auto;
          height: auto;
          font-size: 24px;
        }

      }

      .thumbnail-preview {
        max-width: 80px;
        border-radius: 7px;

        &-wrap {
          width: 100%;
          margin-top: 10px;
        }

      }

    }

    .popup-triggers {
      display: flex;
      flex-direction: column;
      width: 100% !important;
      flex-wrap: wrap;

      h3 {
        width: 100%;
        margin-bottom: 5px;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        font-weight: 600;
      }

      p {
        margin-top: 0;
        font-size: .875rem;
        color: #777;
      }

      .trigger-group {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        margin-bottom: 12px;
        width: 100%;

        & > button {
          height: 40px;

          i {
            margin-right: 0;
          }
        }

      }

      .group-item {
        display: flex;
        flex-direction: column;
        flex: 1;
        margin-right: 20px;

        &-header {
          display: flex;
          flex-direction: column;
          margin: 7px 5px;

          .header-title {
            font-size: 1rem;
            font-weight: 500;
            line-height: 1.5;
            color: #333;
          }

          .description {
            font-size: .8rem;
            font-weight: 400;
            line-height: 1.5;
            color: #666;
          }

        }

        .input-group {
          width: 100%;
          display: flex;
          align-items: flex-start;
          flex-wrap: nowrap;

          input {
            width: 100%;
            border: 1px solid #ddd;
            padding: .5rem;
            height: 40px;
            border-radius: 7px;
          }

          .input-group-append {
            margin-left: -2px;
            border-top-right-radius: .5rem;
            border-bottom-right-radius: .5rem;
            background: $radio_player_color_light;
            color: #fff;
            padding: .5rem;
            height: 40px;
            width: 50px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease-in-out;

            &:hover {
              background: $radio_player_color;
            }

          }

          .components-base-control,
          .components-select-control {
            width: 100%;
          }

        }

      }

      .components-base-control__field {
        margin-bottom: 0;
      }

      .add-group {
        width: max-content;
      }

    }

    .wp-editor-wrap {
      width: 100%;

      textarea {
        border: none;
        width: 100%;
        min-height: 200px;
      }
    }

    input[type="number"],
    input[type="text"], {
      width: 350px;
      max-width: 100%;
      height: 40px;
      border: 1px solid #ddd;
      padding: .5rem;
      border-radius: 7px;
    }

    @media (max-width: 1199px) {
      flex-direction: column;
      margin-bottom: 20px;
      align-items: flex-start;

      label {
        margin-right: 0;
        margin-bottom: 10px;

        &:after {
          display: none;
        }
      }

      .input-group {
        width: 100%;
      }

      &-content {
        width: 100%;
      }
    }

  }

  .save-settings {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: $radio_player_color;
    color: #fff;
    border-color: #ddd;
    border-radius: 7px;
    line-height: 1;
    margin-bottom: 0;

    i {
      margin-right: .5rem;
    }

    &:hover {
      background: #4CAE4C;
      color: #FFF;
    }
  }

  .display-sticky-player {
    .input-group {
      .components-form-toggle {
        margin-right: 7px;
      }

      p {
        margin-top: 0;
      }

      &.page-selection {
        margin-top: 10px;
        flex-flow: column;
        align-items: baseline;

        .radio-player-select__control {
          max-width: 350px;
          min-width: 200px;
        }
      }

    }


  }

  @media (max-width: 767px) {
    flex-direction: column;

    .radio-player-settings-header {
      top: 0;
      padding: 5px 15px;
      margin-left: -10px;
      width: calc(100% + 10px);

      .header-title {
        svg {
          width: 30px;
          margin-right: 7px;
        }

        span {
          font-size: 1rem;
        }

      }
    }

    .tab-links {
      width: calc(100% - 10px);
      max-width: none;
      margin-bottom: 20px;
      position: static;
      margin-right: 15px;
    }

    .tab-content {
      width: calc(100% - 10px);
      max-width: none;
      margin-right: 15px;
      margin-left: 0;
    }
  }
}

.radio-player-select {
  &__control {
  }

  &__option {
    color: #555 !important;
    display: none;
  }
}

.radio-player-pro-modal {

  .swal2-popup {
    width: 340px;
    padding-top: 50px;

    .swal2-title {
      font-size: 1.2rem;
      font-weight: 600;
      margin: 10px 0 0 0;
      color: #333;
    }

    .pro-offer {
      color: $radio_player_color;
      margin: 0;
      font-size: 2.5rem;
      font-weight: bold;

      .upto {
        font-size: 12px;
      }

    }

    .pro-text {
      font-size: 14px;
      margin: 10px 0;
      color: #555;
    }

  }

  .swal2-icon {
    border: none;
    border-radius: 0;
    display: flex;
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);

    img {
      width: 230px;
    }
  }

  .swal2-close {
    position: absolute;
  }

}