/* Newsletter Form Styling - Based on Figma Design */

@media (min-width: 501px) {
  .newsletter-form-wrapper {
    width: 280px;
  }
}

.newsletter-form {
  position: relative;
}

.newsletter-signup {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.newsletter-input-wrapper {
  position: relative;
  display: flex;
  gap: 8px;
  height: 45px;
}

.newsletter-input {
  flex: 1;
  background-color: #32373c;
  border: 1px solid #9a9a9a;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 28.8px;
  padding: 8px 56px 8px 12px;
  height: 45px;
  transition: border-color 0.2s ease;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.newsletter-input::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.newsletter-input::-moz-placeholder {
  color: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.newsletter-input:-ms-input-placeholder {
  color: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.newsletter-focused .newsletter-input,
.newsletter-input:focus {
  border-color: white;
  outline: none;
  box-shadow: none;
}

.newsletter-submit {
  position: absolute;
  right: 0;
  top: 0;
  background-color: #32373c;
  border: none;
  color: #9a9a9a;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 28.8px;
  padding: 8px 16px;
  width: 56px;
  max-width: 90px;
  height: 45px;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.newsletter-submit:hover {
  color: white;
}

.newsletter-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.newsletter-submit.newsletter-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-submit.newsletter-success-icon svg {
  display: block;
}

.newsletter-privacy {
  font-family: 'Inter', sans-serif;
  font-size: 11.25px;
  line-height: 18px;
  color: #d1d1d1;
  margin-top: -5px;
}

.newsletter-privacy a {
  color: #d1d1d1;
  text-decoration: underline;
  text-underline-position: from-font;
}

.newsletter-privacy a:hover {
  color: white;
}

.newsletter-message {
  font-family: 'Inter', sans-serif;
  font-size: 11.25px;
  line-height: 18px;
  color: #d1d1d1;
  text-align: left;
  display: none;
}

.newsletter-error .newsletter-message,
.newsletter-success .newsletter-message {
  display: block;
}

/* Hide privacy text when showing success/error message */
.newsletter-form:has(.newsletter-error) .newsletter-privacy,
.newsletter-form:has(.newsletter-success) .newsletter-privacy {
  display: none;
}

.newsletter-loading .newsletter-submit {
  position: relative;
  color: transparent;
}

.newsletter-loading .newsletter-submit::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: newsletter-spin 0.6s linear infinite;
  background-color: #32373c;
  z-index: 1;
}

@keyframes newsletter-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
  .newsletter-signup {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(154, 154, 154, 0.75);
  }

  .newsletter-input {
    font-size: 14px;
    padding: 8px 50px 8px 10px;
  }

  .newsletter-submit {
    width: 48px;
    padding: 8px 12px;
  }

  .newsletter-privacy {
    font-size: 10px;
    line-height: 16px;
  }
}

@media (max-width: 500px) {
  .newsletter-signup {
    padding: 0;
    border-bottom: none;
  }
}
