@import '../mixins';

.meetinghub-connect-tab-content {
  .accordion {
    .mhub-section-pannel {
      padding: 40px 20px 10px 30px;
      background: #fff;
      border-radius: 15px;
      width: 65%;
      box-sizing: border-box;

      .mhub-renew-oauth-button {
        background-color: #7856fb;
        border: none;
        border-radius: 8px;
        color: #fff;
        cursor: pointer;
        font-size: 16px;
        padding: 13px 16px;
        float: right;
      }

      &.mhub-zoon-connect-pannel {
        padding-bottom: 80px;
      }

    }

    margin-bottom: 20px;

    .server-auth-credentials-info,
    .webex-credentials-info {
      margin-bottom: 20px;

      .title {
        font-size: 20px;
        font-weight: 700;
        line-height: 1.4;
        display: flex;
        align-items: center;
      }

      .description {
        font-size: 14px;
        color: #000000;

        a {
          color: #7856fb;
          text-decoration: none;
          font-weight: 500;
          font-size: 16px;

          &:hover {
            color: #4f21ff;
            text-decoration: underline;
          }

          &:focus {
            outline: none;
            box-shadow: none;
          }
        }
      }
    }

    .input-container {
      margin-bottom: 40px;

      .input-field {
        display: flex;
        align-items: center;

        label {
          display: block;
          font-size: 16px;
          margin-bottom: 8px;
          width: 25%;
          font-weight: 600;
        }

        input {
          padding: 7px 10px;
          font-size: 14px;
          border: 1px solid #ddd;
          border-radius: 8px;
          width: 67%;

          &:focus {
            box-shadow: none;
            outline: none;
            border: 1px solid #997eff;
          }
        }

        .toggle-trigger {
          display: block;
          margin-left: 5px;
          color: #7856fb;
          text-decoration: none;
          font-size: 16px;

          &:focus {
            outline: none;
            box-shadow: none;
          }

          &:hover {
            text-decoration: underline;
            color: #4f21ff;
          }
        }
      }
    }

  }

  #meetinghub_s2sOauth-app-sdk-credentials {
    margin-top: 50px;
  }

  .mhub-save-actions {
    text-align: left;

    .setting-save-button {
      margin-top: 20px;
    }

    .save-button {
      padding: 10px 16px;
      /* Adjusted padding for better spacing */
      font-size: 16px;
      background-color: #7856fb;
      color: #fff;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      //margin-top: 50px;

      &:hover {
        background-color: #4f21ff;
      }
    }

    .save-button.saved {
      background-color: rgba(183, 183, 183, 0.5098039216);
      color: #333;
    }
  }

  .webx-btn-wrapper {
    width: 65%;
    margin-bottom: 20px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    box-sizing: border-box;

    .mhub-connect-webex {
      padding: 10px 16px;
      font-size: 16px;
      background-color: #7856fb;
      color: #fff;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      width: fit-content;
      text-decoration: none;
      display: inline-block;

      &:hover {
        background-color: #4f21ff;
      }

      &.disconnect {
        background-color: #dc3545;

        &:hover {
          background-color: #c82333;
        }
      }
    }
  }

  // New Connect Button Design - Matches mockup exactly
  .msteams-connect-button-wrapper {
    width: 65%;
    margin-bottom: 20px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    box-sizing: border-box;

    .mhub-connect-msteams-btn {
      padding: 10px 16px;
      font-size: 16px;
      background-color: #7856fb;
      color: #fff;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      width: fit-content;
      text-decoration: none;
      display: inline-block;

      &:hover {
        background-color: #4f21ff;
      }

      &.disconnect {
        background-color: #dc3545;

        &:hover {
          background-color: #c82333;
        }
      }
    }
  }

  // Notice shown when credentials are typed but not yet saved
  .msteams-save-notice {
    width: 65%;
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-end;
    box-sizing: border-box;

    p {
      font-size: 13px;
      color: #856404;
      background-color: #fff3cd;
      border: 1px solid #ffc107;
      border-radius: 6px;
      padding: 8px 14px;
      margin: 0;
    }
  }

  .msteams-credentials-info {
    margin-bottom: 20px;

    .title {
      font-size: 20px;
      font-weight: 700;
      line-height: 1.4;
      display: flex;
      align-items: center;
    }

    .description {
      font-size: 14px;
      color: #000000;

      a {
        color: #7856fb;
        text-decoration: none;
        font-weight: 500;
        font-size: 16px;

        &:hover {
          color: #4f21ff;
          text-decoration: underline;
        }

        &:focus {
          outline: none;
          box-shadow: none;
        }
      }
    }
  }

  .mhub-status-connected {
    background-color: #ecfdf5;
    color: #065f46;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 12px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #a7f3d0;
    line-height: 1;
    text-transform: capitalize;
    margin-top: 5px;

    &::before {
      content: "";
      display: inline-block;
      width: 6px;
      height: 6px;
      background-color: #10b981;
      border-radius: 50%;
      margin-right: 6px;
      box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    }
  }

  .msteams-redirect-url-section {
    margin-bottom: 30px;
    padding: 25px 30px;
    background: #f0f2f5;
    border-radius: 12px;
    border: 1px solid #dde1e6;
    width: 65%;
    box-sizing: border-box;

    .title {
      font-size: 17px;
      font-weight: 700;
      margin-bottom: 12px;
      color: #1a1a1a;
      line-height: 1.4;
    }

    .description {
      font-size: 14px;
      color: #5f6368;
      margin-bottom: 18px;
      line-height: 1.6;
    }

    .url-copy {
      position: relative;
      display: flex;
      align-items: center;
      background: #ffffff;
      border-radius: 8px;
      border: 1px solid #d0d5dd;
      padding: 4px;
      transition: all 0.2s ease;

      &:hover {
        border-color: #7856fb;
        box-shadow: 0 0 0 3px rgba(120, 86, 251, 0.08);
      }

      &:focus-within {
        border-color: #7856fb;
        box-shadow: 0 0 0 3px rgba(120, 86, 251, 0.12);
      }

      input {
        flex: 1;
        padding: 10px 12px;
        border: none;
        border-radius: 6px;
        outline: none;
        width: 100%;
        font-size: 13px;
        background: transparent;
        color: #333;
        font-family: 'Courier New', Courier, monospace;
        line-height: 1.5;

        &:focus {
          outline: none;
        }
      }

      button,
      .copy-button {
        padding: 9px 18px;
        color: #ffffff;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        background: #7856fb;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.2s ease;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-left: 8px;

        &:before {
          content: '📋';
          font-size: 14px;
        }

        &:hover {
          background-color: #6344e6;
          transform: translateY(-1px);
          box-shadow: 0 4px 12px rgba(120, 86, 251, 0.3);
        }

        &:active {
          transform: translateY(0);
          box-shadow: 0 2px 6px rgba(120, 86, 251, 0.3);
        }
      }
    }
  }


  @include respond-to('seventeen_hundread') {
    .accordion {
      .mhub-section-pannel {
        width: 75%;
      }

      .webx-btn-wrapper {
        width: 75%;
        display: flex;
        justify-content: flex-end;
      }
    }

    .msteams-redirect-url-section {
      width: 75%;
    }

    .msteams-connect-button-wrapper {
      width: 75%;
    }

  }

  @include respond-to('xlarge') {
    .accordion {
      .mhub-section-pannel {
        width: 90%;
      }

      .webx-btn-wrapper {
        width: 90%;
        display: flex;
        justify-content: flex-end;
      }
    }

    .msteams-redirect-url-section {
      width: 90%;
    }

    .msteams-connect-button-wrapper {
      width: 90%;
    }

  }

  @include respond-to('large') {
    .accordion {
      .input-container {
        .input-field {
          label {
            width: 35%;
          }

          input {
            width: 65%;
          }
        }
      }

      .textarea-field {
        width: 100%;

        label {
          width: 35%;
        }

        textarea {
          width: 65%;
          margin-right: 45px;
        }

      }
    }
  }

  @include respond-to('xsmall') {
    .accordion {
      .input-container {
        .input-field {
          display: inline-block;
          width: 100%;

          label {
            width: 100%;
          }

          input {
            width: 100%;
          }

          .toggle-trigger {
            margin-top: 10px;
          }
        }
      }

      .textarea-field {
        display: inline-block;
        width: 100%;

        label {
          width: 100%;
        }

        textarea {
          width: 100%;
        }

      }

      .server-auth-credentials-info,
      .webex-credentials-info {
        margin-bottom: 20px;

        .title {
          line-height: 25px;
        }
      }

    }
  }

  @include respond-to('four_hundread') {
    .accordion {
      .mhub-section-pannel {
        width: 85%;
      }

      .webx-btn-wrapper {
        width: 85%;
      }

      .msteams-connect-button-wrapper {
        width: 85%;
      }
    }

    .msteams-redirect-url-section {
      padding: 15px;
      width: 85%;

      .url-copy {
        flex-direction: column;
        padding: 8px;

        input {
          padding: 10px 12px;
          font-size: 12px;
          margin-bottom: 8px;
        }

        button {
          width: 100%;
          margin-left: 0;
          justify-content: center;

          \u0026:hover {
            transform: translateY(0);
          }

          \u0026:active {
            transform: scale(0.98);
          }
        }
      }
    }
  }

}

.mhub-google-meet-connect-tab {
  .mhub-section-pannel {
    background: #ffffff;
    padding: 20px;
    border-color: rgba(0, 0, 0, 0);
    width: auto;
    border-radius: 10px;

    &.additional-info-section {
      margin-bottom: 30px;
      position: relative;
    }

    &.google-meet-credentainal-pannel {
      width: auto;
    }

    .google-meet-integration {
      display: flex;
      align-items: center;
      padding: 20px;
      background-color: #ffffff;
      border-radius: 10px;

      .integration-content {
        // width: 50%;
        padding-right: 20px;


        .title {
          font-size: 2rem;
          font-weight: 500;
          margin-top: 0;

          span {
            font-weight: 700;
          }
        }

        h3 {
          font-size: 18px;
          font-weight: normal;
        }

        p {
          margin: 10px 0;
          font-size: 16px;
          line-height: 1.6;

          a {
            color: #007bff;
            text-decoration: none;

            &:hover {
              color: #0056b3;
            }
          }
        }

        .url-copy {
          margin-top: 10px;
          position: relative;

          input {
            flex: 1;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 8px;
            outline: none;
            width: 100%;
          }

          button {
            padding: 8px 16px;
            color: #7856fb;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            position: absolute;
            background: #ffff;
            right: 4px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 14px;
            padding: 5px 12px;
            border: 1px solid #7856fb;
            font-weight: 600;

            &:hover {
              background-color: #7856fb;
              color: #ffff;
            }
          }
        }
      }

      .integration-image {
        img {
          max-width: 100%;
          height: auto;
          border-radius: 10px;
          position: absolute;
          right: 0;
          bottom: 0;
        }
      }
    }

    .upload-section {
      display: flex;
      justify-content: center;
      align-items: center;

      .drop-zone {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center; // Center elements horizontally
        width: 100%;
        padding: 20px;
        background-color: #f8f9fa; // Optional background color
        border: 3px dashed #ddd;
        border-radius: 8px;
        text-align: center;

        .mhub-round-box {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          font-size: 28px;
          background: #e9edfb;
          width: 102px;
          height: 102px;
          border-radius: 50%;
          margin-bottom: 20px;
        }

        .upload-instruction {
          font-size: 1.25rem;
          margin-bottom: 32px;
        }

        .file-upload-label {
          .button-style {
            display: inline-block;
            padding: 10px 20px;
            background-color: #7856fb;
            color: #fff;
            border-radius: 8px;
            font-weight: 600;
            font-size: 16px;
            line-height: 162%;
            cursor: pointer;

            &:hover {
              background-color: #4f21ff;
            }
          }
        }

        .file-info {
          margin-top: 10px;
          color: #333;
        }

        .error-message {
          margin-top: 10px;
          color: #dc3545;
        }
      }

      .meetinghub-spinner {
        margin-top: 2rem;

      }
    }

    .credential-status {
      text-align: center;
      padding: 30px 100px;

      .top-content {
        h3 {
          color: #212327;
          font-size: 1.7rem;
        }

        p {
          color: #757c8e;
          font-size: 1rem;
        }

      }

      .middle-content {
        padding: 40px 0;

        .img-wrapper {
          border-radius: 80px;
          background: #eff1f7;
          border-radius: 80px;
          height: 70px;
          width: 70px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }

        h3 {
          font-size: 1.25rem;
          color: #3c434a;
          font-weight: 500;
        }
      }

      .bottom-content {
        display: flex;
        flex-direction: column;
        align-items: center;

      }
    }

    .mhub-meet-connected-wrapper {
      display: flex;
      justify-content: space-between;
      padding: 20px;
      align-items: center;

      .connected-left {
        h3 {
          color: #212327;
          font-size: 1.5rem;
          font-weight: 500;

        }

        p {
          color: #757c8e;
          font-size: 0.875rem;
        }

      }

      .connected-right {
        .mhub-reset-credential-btn {
          margin-right: 10px;
        }
      }
    }

    .mhub-consent-screen-btn {
      color: #fff;
      background: #7856fb;
      border-radius: 8px;
      cursor: pointer;
      font-size: 18px;
      padding: 10px 20px;
      border: 1px solid #7856fb;
      font-weight: 600;
      text-decoration: none;

      &:hover {
        background-color: #4f21ff;
        color: #ffff;
      }

    }

    .mhub-reset-credential-btn,
    .mhub-change-account-btn {
      color: #7856fb;
      border-radius: 8px;
      cursor: pointer;
      background: #ffff;
      font-size: 18px;
      padding: 10px 20px;
      border: 1px solid #7856fb;
      font-weight: 600;
      text-decoration: none;
      margin-top: 20px;

      &:hover {
        background-color: #7856fb;
        color: #ffff;
      }
    }
  }

}