// Newsletter & Lead Magnet Component Styles

.newsletter-signup {
  margin: 6rem 0;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  position: relative;
  z-index: 10;

  &__container {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
  }

  &__badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-family: $font-secondary;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #a0aec0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    margin-bottom: 1.25rem;
  }

  &__title {
    font-family: $font-primary;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: $white;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
  }

  &__description {
    font-family: $font-secondary;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.6;
    color: #cbd5e0;
    margin-bottom: 2.25rem;
  }

  &__form {
    width: 100%;
    margin-bottom: 1rem;
  }

  &__input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 520px;
    margin: 0 auto;

    @include media('>phone') {
      flex-direction: row;
      gap: 0.5rem;
    }
  }

  &__input {
    flex: 1;
    min-height: 52px;
    padding: 0.85rem 1.25rem;
    font-family: $font-secondary;
    font-size: 1rem;
    color: $white;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;

    &::placeholder {
      color: #718096;
    }

    &:focus-visible {
      border-color: $white;
      outline: 2px solid #3182ce;
      outline-offset: 2px;
    }
  }

  &__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0.85rem 1.75rem;
    font-family: $font-secondary;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    background: $white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, background-color 0.2s ease;

    &:hover {
      background: #edf2f7;
      transform: translateY(-1px);
    }

    &:active {
      transform: translateY(0);
    }

    &:focus-visible {
      outline: 2px solid #3182ce;
      outline-offset: 2px;
    }
  }

  &__button-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  &__privacy {
    font-family: $font-secondary;
    font-size: 0.8rem;
    color: #718096;
    margin-top: 1rem;
    line-height: 1.4;
  }

  // Modifiers
  &--article {
    margin: 4rem 0;
    padding: 3rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
  }

  &--landing {
    margin: 8rem 0 4rem;
    padding: 5rem 2rem;
    background: transparent;
    border: none;
  }
}

// RTL Support
[dir="rtl"] {
  .newsletter-signup {
    &__title {
      font-family: 'Readex Pro', 'Cairo', $font-primary;
      line-height: 1.35;
    }

    &__description {
      font-family: 'Readex Pro', 'Cairo', $font-secondary;
      line-height: 1.75;
    }

    &__button-icon {
      transform: rotate(180deg);
    }
  }
}

// High Contrast Mode
@media (forced-colors: active) {
  .newsletter-signup {
    border: 2px solid CanvasText;

    &__input {
      border: 1px solid CanvasText;
    }

    &__button {
      border: 1px solid CanvasText;
    }
  }
}
