.subscribe-block {

  .subscribe-block-wrapper {
    display: flex;
    height: 100%;
    gap: 32px;

    @media screen and (max-width: 990px) {
      flex-direction: column;
      gap: 24px;
    }

    &:has(.subscribe-form-wrapper) {
      .subscribe-heading {
        flex: 0 0 360px;
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;

        @media screen and (max-width: 1200px) {
          flex: 1;
        }

        @media screen and (max-width: 990px) {
          flex: none;
        }

        h4 {
          font-weight: 700;
        }

        .subscribe-description {
          margin-bottom: 0;
        }
      }
    }

    .subscribe-heading {
      display: flex;
      align-items: center;
      gap: 32px;
      flex: 1;

       h4 {
        font-weight: 700;
        margin-bottom: 0;
        flex: 1;
      }

      .subscribe-description {
        margin-bottom: 0;
        margin-top: 0;
        flex: 1;
      }

      @media screen and (max-width: 990px) {
        flex-direction: column;
        gap: 16px;
      }
    }

   

    .subscribe-divider {
      width: 1px;
      background: var(--rc-grad-warmth-180);

      @media screen and (max-width: 990px) {
        width: 100%;
        height: 1px;
        background: var(--rc-grad-warmth);
      }
    }

    .subscribe-form-wrapper {

      flex: 1;
      align-self: flex-end;

      @media screen and (max-width: 990px) {
        align-self: stretch;
      }

      form.subscribe-form {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 32px;

        &.submitting {
          opacity: 0.6;
          pointer-events: none;
        }

        input {
          min-width: 150px;
        }

        @media screen and (max-width: 990px) {
          flex-direction: column;
          align-items: stretch;
          gap: 24px;
        }

        .subscribe-error-message {
          display: none;
          color: red;
          margin-top: 8px;
          font-size: 14px;
        }

        &.error .subscribe-error-message {
          display: block;
        }
      }

      .subscribe-success-message {
        justify-self: center;
      }

      .subscribe-form-group {
        display: flex;
        flex-direction: column;
        flex: 1;
      }
    }


    .subscribe-button-wrapper {
      align-self: center;

      @media screen and (max-width: 990px) {
        align-self: flex-start;
      }
    }
  }
}



.has-background {
  .subscribe-block {
    .rc-btn.primary {
      border: 1px solid var(--wp--preset--color--white);
    }
  }
}

/* Modal Styles */
.subscribe-block-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.subscribe-block-modal-content {
  background-color: #fff;
  position: relative;
  padding: 40px;
  border-radius: 8px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);

  @media screen and (max-width: 990px) {
    padding: 30px 20px;
    max-width: 95%;
  }
}

.subscribe-block-modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  color: #151316;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 1;

  &:hover,
  &:focus {
    color: #8752FA;
    outline: none;
  }
}

.subscribe-block-modal-body {
  margin-top: 20px;

  h1, h2, h3, h4, h5, h6 {
    margin-bottom: 16px;
  }

  p {
    margin-bottom: 16px;
  }

  form {
    margin-top: 24px;
  }
}

