/* Newsletter page styling */
.newsletter-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.newsletter-intro {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Form Container Styling */
.newsletter-form-container {
  background: var(--md-primary-fg-color);
  color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

.newsletter-form-container h2 {
  color: white;
  margin-top: 0;
}

/* Form Styling */
.newsletter-form {
  margin: 1.5rem 0;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  color: #333; /* Ensure text is dark on light background */
}

.subscribe-button, .unsubscribe-button {
  background: var(--md-accent-fg-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 0.5rem;
}

.subscribe-button:hover {
  background: var(--md-accent-fg-color--transparent);
}

.unsubscribe-button {
  background: #f44336;
}

.unsubscribe-button:hover {
  background: #d32f2f;
}

.unsubscribe-link {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Unsubscribe form visibility states */
.unsubscribe-form-hidden {
  display: none;
}

.unsubscribe-form-visible {
  display: block;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Form buttons container */
.form-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Cancel button styling */
.cancel-button {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

.unsubscribe-link a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

.unsubscribe-link a:hover {
  color: white;
}

/* Benefits & Highlights Styling */
.newsletter-details {
  background: var(--md-default-bg-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.benefits-list, .highlights-list {
  padding-left: 1.5rem;
}

.benefits-list li, .highlights-list li {
  margin-bottom: 0.75rem;
  position: relative;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .newsletter-container {
    flex-direction: row;
  }
  
  .newsletter-content {
    flex: 3;
    padding-right: 2rem;
  }
  
  .newsletter-details {
    flex: 2;
  }
}

/* Dark theme specific overrides */
[data-md-color-scheme="slate"] .newsletter-form-container {
  /* Keep the dark background for the form container */
  background: var(--md-primary-fg-color);
  color: #ffffff;
}

[data-md-color-scheme="slate"] .form-group label {
  color: #ffffff;
}

[data-md-color-scheme="slate"] .form-group input {
  background: #f5f5f5;
  color: #333333;
  border-color: #666666;
}

[data-md-color-scheme="slate"] .form-group input:focus {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
  outline: none;
}

[data-md-color-scheme="slate"] .subscribe-button {
  background: var(--md-accent-fg-color);
  color: #ffffff;
}

[data-md-color-scheme="slate"] .subscribe-button:hover {
  background-color: #a1e2f7;
  color: #333333;
}

[data-md-color-scheme="slate"] .unsubscribe-button {
  background: #f44336;
  color: #ffffff;
}

[data-md-color-scheme="slate"] .unsubscribe-button:hover {
  background: #ff7961;
}

[data-md-color-scheme="slate"] .unsubscribe-link a {
  color: #a1e2f7; /* Lighter blue for better visibility */
  text-decoration: underline;
}

[data-md-color-scheme="slate"] .unsubscribe-link a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Dark theme unsubscribe form */
[data-md-color-scheme="slate"] .unsubscribe-form-visible {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-md-color-scheme="slate"] .cancel-button {
  background: transparent;
  color: #a1e2f7;
  border-color: rgba(161, 226, 247, 0.3);
}

[data-md-color-scheme="slate"] .cancel-button:hover {
  background: rgba(161, 226, 247, 0.1);
  color: #ffffff;
  border-color: rgba(161, 226, 247, 0.5);
}

[data-md-color-scheme="slate"] .newsletter-details {
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
}
