/* Global Box-Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Farb-Variablen */
:root {
  --ntf-bg: #fff;
  --ntf-border: #ddd;
  --ntf-primary: #c00000;
  --ntf-primary-hover: #FF4500;
  --ntf-gray: #cccccc;
  --ntf-gray-light: #eee;
  --ntf-success-bg: #e7f6e7;
  --ntf-success-border: #b6d7b6;
  --ntf-error-bg: #f9e3e3;
  --ntf-error-border: #e5c3c3;
  --ntf-green-light: #b7d5ac;
  --ntf-green: #93bf85;
}

/* Basis-Styles (mobile-first) */
.newsletter-container {
  background: var(--ntf-bg);
  padding: 15px;
  border: 1px solid var(--ntf-border);
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin: 0 auto;
}

h1.newsletter-title {
  text-align: center;
  margin-bottom: 0;
  color: var(--ntf-primary);
  font-size: 1.5em;
}

.newsletter-note {
  text-align: center;
  color: var(--ntf-primary);
  font-size: 1.1em;
  margin: 0 0 25px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
}

.newsletter-form label {
  margin-bottom: 5px;
  font-weight: bold;
}

.newsletter-form input[type="text"],
.newsletter-form input[type="email"],
.newsletter-form input[type="url"],
.newsletter-form select,
.newsletter-form textarea {
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid var(--ntf-border);
  border-radius: 3px;
  font-size: 1rem;
  width: 100%;
}

.newsletter-form button {
  padding: 10px;
  border: none;
  background-color: var(--ntf-primary);
  color: #fff;
  font-size: 1rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

.newsletter-form button:disabled {
  background-color: var(--ntf-gray);
  cursor: not-allowed;
}

.newsletter-form button:hover {
  background-color: var(--ntf-primary-hover);
}

.newsletter-form .hidden-field {
  display: none;
}

.note {
  margin-top: 20px;
  text-align: center;
}

.error-message {
  color: var(--ntf-primary);
  font-size: 0.9rem;
  margin: -10px 0 10px;
}

.freemail-error {
  color: var(--ntf-primary);
  font-size: 1.05rem;
  font-weight: bold;
  margin: -10px 0 15px;
}

.newsletter-message {
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  margin-bottom: 20px;
}

.newsletter-message.success {
  background-color: var(--ntf-success-bg);
  border: 1px solid var(--ntf-success-border);
  color: #2c662c;
}

.newsletter-message.error {
  background-color: var(--ntf-error-bg);
  border: 1px solid var(--ntf-error-border);
  color: var(--ntf-primary);
}

.newsletter-form button.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.privacy-checkbox-container {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
}

.privacy-checkbox-container input[type="checkbox"] {
  margin-top: 3px;
  margin-right: 10px;
  flex-shrink: 0;
}

.privacy-label {
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: left;
}

.section-title {
  color: var(--ntf-primary);
  margin: 20px 0 15px;
  font-size: 1.2em;
  font-weight: bold;
}

.form-hint {
  margin-bottom: 15px;
  font-style: italic;
  color: #666;
}

.interest-checkbox-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.interest-checkbox {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
}

.interest-checkbox input[type="checkbox"] {
  margin-top: 3px;
  margin-right: 10px;
}

.privacy-note {
  color: #666;
  font-style: italic;
  margin-top: 15px;
}

.success-message {
  background-color: #f8f9fa;
  border-left: 4px solid #28a745;
  padding: 20px;
  margin: 20px 0;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.success-message h3 {
  font-size: 1.3em;
  color: #28a745;
  margin: 0 0 20px;
}

.success-message p {
  font-size: 1.1em;
  line-height: 1.6;
}

.success-message strong {
  font-weight: bold;
}

#message,
#personalizationMessage {
  font-size: 1.2em;
  line-height: 1.5;
  padding: 15px;
  margin-top: 25px;
}

#message:empty {
  padding: 0px;
	margin-top: 0px;
}

.welcome-container {
  text-align: center;
  max-width: 90%;
  margin: 0 auto;
}

.welcome-container p {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 20px;
}

.welcome-container form {
  margin-top: 30px;
}

.welcome-container button {
  min-width: 180px;
}

.welcome-container .welcome-heading {
  font-size: 1.5em;
  margin-bottom: 20px;
  color: #333;
}

.welcome-container .welcome-message {
  font-size: 1.4em;
  line-height: 1.5;
  margin-bottom: 25px;
}

.interests-container {
  margin: 20px auto;
}

.section-intro {
  font-size: 1.4em;
  margin-bottom: 25px;
}

.interest-slider-container {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--ntf-gray-light);
}

.interest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.interest-header label {
  font-weight: bold;
  font-size: 1.1em;
  color: #333;
  margin: 0;
}

.interest-value {
  font-weight: bold;
  color: var(--ntf-primary);
}

.interest-description {
  color: #666;
  margin-bottom: 12px;
  font-size: 0.9em;
  font-style: italic;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-label-min,
.slider-label-max {
  font-size: 0.8em;
  color: #000;
  white-space: nowrap;
}

.interest-slider {
  flex-grow: 1;
  height: 10px;
  -webkit-appearance: none;
  background: linear-gradient(to right, var(--ntf-gray-light), var(--ntf-primary));
  border-radius: 5px;
  outline: none;
}

.interest-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ntf-primary);
  cursor: pointer;
}

.interest-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ntf-primary);
  cursor: pointer;
  border: none;
}

.form-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.back-button,
a.back-button {
  background-color: #f0f0f0;
  color: #666;
  border: 1px solid var(--ntf-border);
  border-radius: 3px;
  padding: 10px;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
}

.back-button:hover,
a.back-button:hover {
  background-color: #e0e0e0;
}

.forward-button {
  background-color: var(--ntf-primary);
  color: white;
  border: none;
  border-radius: 3px;
  padding: 10px;
  cursor: pointer;
  font-size: 1rem;
}

.forward-button:hover {
  background-color: var(--ntf-primary-hover);
}

/* Roter Rahmen für leere Eingabe- und Auswahl-Felder */
.newsletter-form input:not([type="hidden"]), 
.newsletter-form select {
  /* Standard-Rahmen (wie bisher) */
  border: 1px solid var(--ntf-border);
}
/* Wenn Feld leer ist: roter Rahmen */
.newsletter-form .error-border {
  border: 1px solid red !important;
}
/* „Titel“-Feld (name="prefix") immer grau umrahmen */
/* Wenn das Präfix-Feld trotzdem einmal die .error-border-Klasse bekommt, 
   schalten wir sie für dieses eine Feld aus */
.newsletter-form input[name="prefix"].error-border {
  border: 1px solid var(--ntf-border) !important;
}

/* Stepper */
.stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  padding: 0;
}

.stepper .step {
  flex: 1;
  text-align: center;
  position: relative;
}

.stepper .step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--ntf-gray);
  z-index: 0;
}

.stepper .step-number {
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
  border: 2px solid var(--ntf-gray);
  background: var(--ntf-gray);
  color: #ffffff;
  font-weight: bold;
  display: inline-block;
  position: relative;
  z-index: 1;
}

.stepper .step-label {
  margin-top: 6px;
  font-size: 0.9em;
  color: #888888;
  font-weight: normal;
}

.stepper .step.completed .step-number {
  border-color: var(--ntf-green-light);
  background: var(--ntf-green-light);
}

.stepper .step.completed .step-label {
  color: var(--ntf-green);
}

.stepper .step.active .step-number {
  border-color: var(--ntf-primary);
  background: var(--ntf-primary);
  color: #ffffff;
}

.stepper .step.active .step-label {
  color: var(--ntf-primary);
  font-weight: bold;
}

/* Desktop-Styles ab 601px */
@media (min-width: 601px) {
  .newsletter-container {
    max-width: 500px;
    padding: 30px;
  }
}
