/* =============================================
   vertragsende.com - Form Page Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=Instrument+Serif:ital@0;1&display=swap');

/* ---- Neve Container-Overrides fuer volle Breite ---- */
body:has(.ve-form-page) .single-page-container,
body:has(.ve-home) .single-page-container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body:has(.ve-form-page) .nv-single-page-wrap,
body:has(.ve-home) .nv-single-page-wrap {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
}

body:has(.ve-form-page) .wrapper,
body:has(.ve-home) .wrapper {
  overflow: visible !important;
}

/* ---- Page wrapper ---- */
.ve-form-page {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  color: #1a1a2e;
  position: relative;
  overflow: hidden;
  min-height: 80vh;
}

.ve-form-page * { box-sizing: border-box; }

/* ---- Ambient background ---- */
.ve-form-page .ve-form-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 5% 15%, rgba(78, 181, 196, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 95% 85%, rgba(30, 115, 190, 0.04) 0%, transparent 60%),
    linear-gradient(180deg, #f8fafb 0%, #f0f4f7 100%);
  z-index: 0;
}

/* ---- Content container ---- */
.ve-form-page .ve-form-wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 48px 80px;
}

@media (max-width: 768px) {
  .ve-form-page .ve-form-wrap {
    padding: 32px 16px 60px;
  }
}

/* ---- Page header ---- */
.ve-form-page .ve-form-header {
  text-align: center;
  margin-bottom: 40px;
  opacity: 0;
  animation: ve-formFadeUp 0.5s ease forwards 0.1s;
}

.ve-form-page .ve-form-header .ve-form-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a9daa;
}

.ve-form-page .ve-form-header h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 400;
  color: #1a1a2e;
  line-height: 1.25;
  margin: 0 0 8px 0;
}

.ve-form-page .ve-form-header p {
  font-size: 15px;
  color: #4a5568;
  font-weight: 400;
  margin: 0;
}

/* ---- CSS Icons (WordPress-safe, keine inline SVGs) ---- */
.ve-form-icon.ve-icon-doc {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233a9daa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='9' y1='15' x2='15' y2='15'/%3E%3C/svg%3E") center / 24px no-repeat,
    linear-gradient(135deg, rgba(78, 181, 196, 0.14), rgba(78, 181, 196, 0.04));
}

.ve-form-icon.ve-icon-clock {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233a9daa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") center / 24px no-repeat,
    linear-gradient(135deg, rgba(78, 181, 196, 0.14), rgba(78, 181, 196, 0.04));
}

.ve-form-icon.ve-icon-home {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233a9daa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") center / 24px no-repeat,
    linear-gradient(135deg, rgba(78, 181, 196, 0.14), rgba(78, 181, 196, 0.04));
}

.ve-form-icon.ve-icon-shield {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233a9daa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E") center / 24px no-repeat,
    linear-gradient(135deg, rgba(78, 181, 196, 0.14), rgba(78, 181, 196, 0.04));
}

.ve-form-icon.ve-icon-undo {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233a9daa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 4 1 10 7 10'/%3E%3Cpath d='M3.51 15a9 9 0 1 0 2.13-9.36L1 10'/%3E%3C/svg%3E") center / 24px no-repeat,
    linear-gradient(135deg, rgba(78, 181, 196, 0.14), rgba(78, 181, 196, 0.04));
}

/* ---- Back link ---- */
.ve-form-page .ve-back-link {
  margin-bottom: 32px;
  opacity: 0;
  animation: ve-formFadeUp 0.5s ease forwards 0.05s;
}

.ve-form-page .ve-back-link a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #3a9daa !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.ve-form-page .ve-back-link a:hover {
  color: #2a7a85 !important;
}

/* ---- Form card ---- */
.ve-form-page .ve-form-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(78, 181, 196, 0.1);
  border-radius: 20px;
  padding: 48px 44px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.03);
  opacity: 0;
  animation: ve-formFadeUp 0.5s ease forwards 0.2s;
}

@media (max-width: 768px) {
  .ve-form-page .ve-form-card {
    padding: 28px 20px;
    border-radius: 16px;
  }
}

/* =============================================
   Gravity Forms Style Overrides
   ============================================= */

/* ---- Progress bar / steps ---- */
.ve-form-card .gf_progressbar_wrapper {
  margin-bottom: 36px !important;
}

.ve-form-card .gf_progressbar {
  background: #e8edf2 !important;
  border-radius: 100px !important;
  height: 6px !important;
  overflow: hidden;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}

.ve-form-card .gf_progressbar_percentage {
  background: linear-gradient(90deg, #4eb5c4, #3a9daa) !important;
  border-radius: 100px !important;
  height: 6px !important;
  line-height: 6px !important;
  font-size: 0 !important;
  padding: 0 !important;
  text-align: right;
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.ve-form-card .gf_progressbar_percentage span {
  display: none !important;
}

.ve-form-card .gf_progressbar_title {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #6b7a8d !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  margin-bottom: 10px !important;
}

/* ---- Step indicator (numbered) ---- */
.ve-form-card .gf_page_steps {
  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-bottom: 36px !important;
  padding: 0 !important;
  border: none !important;
}

.ve-form-card .gf_step {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  border-radius: 100px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #8a96a3 !important;
  background: transparent !important;
  border: none !important;
  transition: all 0.3s ease;
}

.ve-form-card .gf_step_active {
  background: rgba(78, 181, 196, 0.1) !important;
  color: #2a8f9e !important;
}

.ve-form-card .gf_step_completed {
  color: #3a9daa !important;
}

.ve-form-card .gf_step span.gf_step_number {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  background: #e8edf2 !important;
  color: #6b7a8d !important;
  transition: all 0.3s ease;
}

.ve-form-card .gf_step_active span.gf_step_number {
  background: #4eb5c4 !important;
  color: #fff !important;
}

.ve-form-card .gf_step_completed span.gf_step_number {
  background: #3a9daa !important;
  color: #fff !important;
}

/* ---- Section titles ---- */
.ve-form-card .gsection {
  border-bottom: 1px solid #e8edf2 !important;
  margin-top: 8px !important;
  margin-bottom: 28px !important;
  padding-bottom: 16px !important;
}

.ve-form-card .gsection_title,
.ve-form-card h2.gsection_title,
.ve-form-card h3.gsection_title {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #1a1a2e !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---- Labels ---- */
.ve-form-card .gfield_label,
.ve-form-card .gform-field-label {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #2d3748 !important;
  margin-bottom: 6px !important;
  letter-spacing: 0.2px;
}

.ve-form-card .gfield_required {
  color: #e05252 !important;
}

/* ---- Inputs, selects, textareas ---- */
.ve-form-card input[type="text"],
.ve-form-card input[type="email"],
.ve-form-card input[type="tel"],
.ve-form-card input[type="number"],
.ve-form-card input[type="url"],
.ve-form-card input[type="date"],
.ve-form-card select,
.ve-form-card textarea {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 14px !important;
  color: #1a1a2e !important;
  background: #f8fafb !important;
  border: 1.5px solid #dde3ea !important;
  border-radius: 10px !important;
  padding: 11px 14px !important;
  width: 100% !important;
  transition: all 0.25s ease !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none;
}

.ve-form-card input[type="text"]:focus,
.ve-form-card input[type="email"]:focus,
.ve-form-card input[type="tel"]:focus,
.ve-form-card input[type="number"]:focus,
.ve-form-card input[type="url"]:focus,
.ve-form-card input[type="date"]:focus,
.ve-form-card select:focus,
.ve-form-card textarea:focus {
  background: #fff !important;
  border-color: #4eb5c4 !important;
  box-shadow: 0 0 0 3px rgba(78, 181, 196, 0.12) !important;
}

.ve-form-card select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 36px !important;
}

.ve-form-card textarea {
  min-height: 100px;
  resize: vertical;
}

/* ---- Placeholder ---- */
.ve-form-card input::placeholder,
.ve-form-card textarea::placeholder {
  color: #a0aec0 !important;
  font-weight: 400;
}

/* ---- Checkbox / Radio ---- */
.ve-form-card .gfield_checkbox label,
.ve-form-card .gfield_radio label {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 14px !important;
  color: #2d3748 !important;
  font-weight: 400 !important;
}

.ve-form-card input[type="checkbox"],
.ve-form-card input[type="radio"] {
  accent-color: #4eb5c4 !important;
}

/* ---- Field spacing ---- */
.ve-form-card .gform_fields > .gfield {
  margin-bottom: 20px !important;
}

/* ---- Description / instructions ---- */
.ve-form-card .gfield_description,
.ve-form-card .instruction {
  font-size: 12px !important;
  color: #718096 !important;
  font-weight: 400 !important;
  margin-top: 4px !important;
}

/* ---- Validation ---- */
.ve-form-card .gfield_error input,
.ve-form-card .gfield_error select,
.ve-form-card .gfield_error textarea {
  border-color: #e05252 !important;
  background: #fef8f8 !important;
}

.ve-form-card .gfield_error .gfield_label {
  color: #c53030 !important;
}

.ve-form-card .validation_message,
.ve-form-card .gfield_validation_message {
  font-size: 12px !important;
  color: #e05252 !important;
  font-weight: 500 !important;
  margin-top: 4px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

.ve-form-card .gform_validation_errors,
.ve-form-card .validation_error {
  background: #fef8f8 !important;
  border: 1px solid rgba(224, 82, 82, 0.2) !important;
  border-radius: 12px !important;
  padding: 16px 20px !important;
  margin-bottom: 24px !important;
  color: #c53030 !important;
  font-size: 14px !important;
}

/* ---- Buttons ---- */
.ve-form-card .gform_button,
.ve-form-card .gform_next_button,
.ve-form-card input[type="submit"],
.ve-form-card .gform_previous_button + .gform_next_button,
.ve-form-card .button {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #4eb5c4, #3a9daa) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 12px 28px !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
  box-shadow: 0 2px 8px rgba(78, 181, 196, 0.2) !important;
  letter-spacing: 0.3px;
}

.ve-form-card .gform_button:hover,
.ve-form-card .gform_next_button:hover,
.ve-form-card input[type="submit"]:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(78, 181, 196, 0.3) !important;
  filter: brightness(1.05);
}

.ve-form-card .gform_previous_button {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #4a5568 !important;
  background: transparent !important;
  border: 1.5px solid #dde3ea !important;
  border-radius: 10px !important;
  padding: 12px 24px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: none !important;
  margin-right: 12px !important;
}

.ve-form-card .gform_previous_button:hover {
  background: #f0f4f7 !important;
  border-color: #c0c9d4 !important;
  color: #1a1a2e !important;
}

/* ---- Footer area ---- */
.ve-form-card .gform_footer,
.ve-form-card .gform_page_footer {
  margin-top: 32px !important;
  padding-top: 24px !important;
  border-top: 1px solid #e8edf2 !important;
  display: flex !important;
  align-items: center !important;
}

/* ---- Required legend ---- */
.ve-form-card .gform_required_legend {
  font-size: 12px !important;
  color: #8a96a3 !important;
  margin-bottom: 20px !important;
}

/* ---- Honeypot ---- */
.ve-form-card .gform_validation_container {
  display: none !important;
}

/* ---- File upload ---- */
.ve-form-card .ginput_container_fileupload input[type="file"] {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
}

/* ---- Datepicker ---- */
.ve-form-card .datepicker {
  font-family: 'DM Sans', sans-serif !important;
}

/* ---- Consent / DSGVO ---- */
.ve-form-card .ginput_container_consent label {
  font-size: 13px !important;
  color: #4a5568 !important;
  line-height: 1.5 !important;
}

/* ---- Tooltips ---- */
.ve-form-card .gf_tooltip {
  font-family: 'DM Sans', sans-serif !important;
}

/* =============================================
   GravityView Table Overrides
   ============================================= */

.ve-form-card .gv-table-view {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
}

.ve-form-card .gv-table-view thead th {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  color: #4a5568 !important;
  background: #f0f4f7 !important;
  padding: 12px 16px !important;
  border-bottom: 2px solid #dde3ea !important;
  white-space: nowrap;
}

.ve-form-card .gv-table-view thead th:first-child {
  border-radius: 8px 0 0 0 !important;
}

.ve-form-card .gv-table-view thead th:last-child {
  border-radius: 0 8px 0 0 !important;
}

.ve-form-card .gv-table-view tbody td {
  padding: 10px 16px !important;
  border-bottom: 1px solid #edf0f4 !important;
  color: #2d3748 !important;
  font-size: 13px !important;
  vertical-align: middle !important;
}

.ve-form-card .gv-table-view tbody tr:hover td {
  background: rgba(78, 181, 196, 0.04) !important;
}

.ve-form-card .gv-table-view tbody tr:last-child td {
  border-bottom: none !important;
}

.ve-form-card .gv-table-view a {
  color: #3a9daa !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.ve-form-card .gv-table-view a:hover {
  color: #2a7a85 !important;
  text-decoration: underline !important;
}

/* GravityView action buttons (Nachweis etc.) */
.ve-form-card .gv-table-view a.btn,
.ve-form-card .gv-table-view a.button,
.ve-form-card .gv-table-view .gv-field-html a[style],
.ve-form-card .gv-table-view td a[style*="background"],
.ve-form-card .gv-table-view .reviewk,
.ve-form-card .gv-table-view input[type="button"],
.ve-form-card .gv-table-view input[type="submit"] {
  background: linear-gradient(135deg, #4eb5c4, #3a9daa) !important;
  color: #fff !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
  border: none !important;
  display: inline-block !important;
  text-decoration: none !important;
  letter-spacing: 0.3px;
}

/* GravityView search/filter bar */
.ve-form-card .gv-search-box {
  margin-bottom: 24px !important;
}

.ve-form-card .gv-search-box input[type="text"],
.ve-form-card .gv-search-box input[type="search"],
.ve-form-card .gv-search-box select {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  border: 1.5px solid #dde3ea !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  background: #f8fafb !important;
}

.ve-form-card .gv-search-box input[type="submit"] {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #4eb5c4, #3a9daa) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 18px !important;
  cursor: pointer !important;
}

/* GravityView pagination */
.ve-form-card .gv-widget-pagination,
.ve-form-card .gravityview-pagination {
  font-family: 'DM Sans', sans-serif !important;
  margin-top: 20px !important;
  font-size: 13px !important;
}

.ve-form-card .gv-widget-pagination a,
.ve-form-card .gravityview-pagination a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 8px !important;
  border-radius: 6px !important;
  border: 1px solid #dde3ea !important;
  color: #4a5568 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.ve-form-card .gv-widget-pagination a:hover,
.ve-form-card .gravityview-pagination a:hover {
  background: rgba(78, 181, 196, 0.08) !important;
  border-color: #4eb5c4 !important;
  color: #3a9daa !important;
}

/* GravityView "no results" */
.ve-form-card .gv-no-results {
  text-align: center !important;
  padding: 48px 20px !important;
  color: #6b7a8d !important;
  font-size: 15px !important;
}

/* ---- Animations ---- */
@keyframes ve-formFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
