@use "../../variables.scss" as *;

.googleAdsContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 1rem;
  box-sizing: border-box;

  .innerBox {
    width: 100%;
    max-width: 600px;
    background-color: $googleAdsBoxColor;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px $googleAdsShadowColor;
    text-align: center;
    margin: 0 10px;

    @media (max-width: 480px) {
      padding: 1rem;
      border-radius: 6px;
    }

    h1 {
      font-size: 1.5rem;
      color: $googleAdsPrimaryColor;
      margin-bottom: 1rem;
      font-weight: bold;
      line-height: 1.3;

      @media (max-width: 480px) {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
      }
    }

    .infoText {
      font-size: 0.9rem;
      color: $googleAdsTextColor;
      margin-bottom: 1.5rem;
      line-height: 1.5;
      padding: 0 10px;

      @media (max-width: 480px) {
        font-size: 0.85rem;
        margin-bottom: 1rem;
      }

      a {
        color: $googleAdsSecondaryColor;
        text-decoration: none;
        word-break: break-all;

        &:hover {
          text-decoration: underline;
        }
      }
    }

    .integrationForm {
      display: flex;
      flex-direction: column;
      gap: 1rem;

      .inputGroup {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 0 10px;

        label {
          font-size: 0.9rem;
          font-weight: bold;
          color: $googleAdsTextColor;
          margin-bottom: 0.5rem;
        }

        input {
          width: 100%;
          padding: 0.8rem;
          font-size: 0.9rem;
          border: 1px solid darken($googleAdsShadowColor, 10%);
          border-radius: 6px;
          background-color: lighten($googleAdsBoxColor, 5%);
          transition: border-color 0.3s ease;
          box-sizing: border-box;

          @media (max-width: 480px) {
            padding: 0.7rem;
            font-size: 0.85rem;
          }

          &:focus {
            border-color: $googleAdsSecondaryColor;
          }
        }
      }

      .buttonGroup {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
        padding: 0 10px;

        @media (max-width: 480px) {
          flex-direction: column;
          gap: 0.8rem;
        }

        button {
          padding: 0.8rem;
          font-size: 1rem;
          border-radius: 6px;
          cursor: pointer;
          border: none;
          transition: background-color 0.3s ease;
          flex: 1;
          min-width: 120px;
          box-sizing: border-box;

          @media (max-width: 480px) {
            width: 100%;
            padding: 0.8rem;
            font-size: 0.9rem;
          }

          &.saveButton {
            background-color: $googleAdsPrimaryColor;
            color: $googleAdsSaveButton;

            &:hover {
              background-color: lighten($googleAdsPrimaryColor, 10%);
            }
          }

          &.testButton {
            background-color: $googleAdsSecondaryColor;
            color: $googleAdsTestButton;

            &:hover {
              background-color: lighten($googleAdsSecondaryColor, 10%);
            }
          }
        }
      }

      .feedbackText {
        font-size: 0.9rem;
        margin-top: 1rem;
        padding: 0 10px;

        @media (max-width: 480px) {
          font-size: 0.85rem;
        }

        &.error {
          color: $googleAdsErrorColor;
        }

        &.success {
          color: $googleAdsSuccessColor;
        }
      }
    }
  }
}
