/* Form Styles */
html:has(dialog[open]) {
  overflow: hidden;
}

dialog {
  margin: 0 auto;
  margin-top: 3rem;
  background-color: transparent;
  border: none;
}

::backdrop {
  background-color: rgba(0, 0, 0, 0.7);
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

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

.form-submit {
  margin-top: 1.5rem;
}

.modal-form input[type='text'],
.modal-form input[type='email'],
.modal-form input[type='tel'] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.modal-form input[type='text']:focus,
.modal-form input[type='email']:focus,
.modal-form input[type='tel']:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.modal-error {
  background-color: #fee2e2;
  color: #b91c1c;
  padding: 1rem;
  border-radius: 0.375rem;
  margin-top: 1rem;
}

.form-validation-error {
  color: #b91c1c;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-group.error input {
  border-color: #b91c1c;
}
/* Newsletter-Formular Styles */
.newsletter-signup {
  margin-top: 1.5rem;
  max-width: 400px;
}

.newsletter-signup h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.newsletter-signup p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.newsletter-form .form-item {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form .form-input {
  flex: 1;
  height: 40px;
  border-radius: 4px;
}

.newsletter-form .btn {
  height: 40px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--spacing-lg);
}

.newsletter-form .alert {
  margin-top: 0.5rem;
  padding: 0.5rem;
  font-size: 0.85rem;
  border-radius: 4px;
}

.newsletter-form .alert-success {
  background-color: rgba(46, 213, 115, 0.2);
  color: #2ed573;
}

.newsletter-form .alert-error {
  background-color: rgba(255, 71, 87, 0.2);
  color: #ff4757;
}

/* ------------------------------------------------------------------ */
/* Contact Form 7 structural markup (all forms)                        */
/* CF7 wraps inline content in <p> and every control in a span – map   */
/* that chrome onto the original feeflow form styles.                  */
/* ------------------------------------------------------------------ */
.wpcf7 form p {
  margin: 0;
}

.wpcf7 .wpcf7-form-control-wrap {
  display: block;
}

.wpcf7 .wpcf7-not-valid-tip {
  color: #ff4757;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.wpcf7 .wpcf7-spinner {
  position: absolute;
}

/* Response messages styled like the original .alert boxes */
.wpcf7 form .wpcf7-response-output {
  margin: 1.5rem 0 0;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 8px;
  animation: feeflow-fade-in 0.5s ease-in-out;
}

.wpcf7 form.sent .wpcf7-response-output {
  background-color: rgba(46, 213, 115, 0.1);
  border-left: 4px solid #2ed573;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
  background-color: rgba(255, 71, 87, 0.1);
  border-left: 4px solid #ff4757;
}

@keyframes feeflow-fade-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CF7 acceptance checkbox -> original .checkbox-container layout */
.checkbox-container .wpcf7-list-item {
  margin: 0;
}

.checkbox-container .wpcf7-list-item > label {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
}

.checkbox-container input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
  accent-color: var(--primary-color);
  flex-shrink: 0;
}

.checkbox-container .wpcf7-list-item-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Kontakt page: card around the form (inline style in the original) */
.contact-form-container {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 2rem;
}

/* Inside the card the title sits flush at the top – cancel the generic
   .entry-content heading margins. */
.contact-form-container .card-title {
  margin-top: 0;
}

/* Contact Form 7 markup inside the footer newsletter form */
/* CF7 wraps the controls in a <p> – make that the flex row. */
.newsletter-form .form-item p {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  margin: 0;
}

.newsletter-form .wpcf7-form-control-wrap {
  flex: 1;
}

.newsletter-form .form-input {
  width: 100%;
}

.newsletter-form .wpcf7-spinner {
  position: absolute;
}

.newsletter-form .wpcf7-not-valid-tip {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.newsletter-form .wpcf7 form .wpcf7-response-output {
  margin: 0.5rem 0 0;
  padding: 0.5rem;
  font-size: 0.85rem;
  border: none;
  border-radius: 4px;
}

.newsletter-form .wpcf7 form.sent .wpcf7-response-output {
  background-color: rgba(46, 213, 115, 0.2);
  color: #2ed573;
}

.newsletter-form .wpcf7 form.invalid .wpcf7-response-output,
.newsletter-form .wpcf7 form.unaccepted .wpcf7-response-output,
.newsletter-form .wpcf7 form.failed .wpcf7-response-output,
.newsletter-form .wpcf7 form.aborted .wpcf7-response-output {
  background-color: rgba(255, 71, 87, 0.2);
  color: #ff4757;
}
