/* 
 * Toucans Roundnet / SV Lindenau 1848 e.V. - Aufnahmeantrag
 * Modern, responsive form styling matching Hestia Pro Theme
 */

:root {
  --sv-font: inherit;
  --sv-primary: #15803d; /* Clean forest green */
  --sv-primary-hover: #166534;
  --sv-primary-subtle: #f0fdf4;
  --sv-primary-border: #bbf7d0;
  --sv-accent: #0f766e;
  --sv-text-main: #1f2937;
  --sv-text-muted: #64748b;
  --sv-bg-card: #ffffff;
  --sv-bg-subtle: #f8fafc;
  --sv-border: #d1d5db;
  --sv-border-light: #e2e8f0;
  --sv-border-focus: #15803d;
  --sv-focus-ring: rgba(21, 128, 61, 0.18);
  --sv-error: #dc2626;
  --sv-radius: 8px;
  --sv-radius-sm: 6px;
  --sv-shadow-card: 0 4px 16px rgba(0, 0, 0, 0.06);
  --sv-transition: all 0.2s ease-in-out;
}

.sv-lindenau-form-container {
  max-width: 720px;
  width: 100%;
  margin: 30px auto;
  padding: 32px 30px;
  background: var(--sv-bg-card);
  border-radius: var(--sv-radius);
  border: 1px solid var(--sv-border-light);
  box-shadow: var(--sv-shadow-card);
  font-family: inherit !important;
  color: var(--sv-text-main);
  box-sizing: border-box;
  position: relative;
}

.sv-lindenau-form-container *,
.sv-lindenau-form-container input,
.sv-lindenau-form-container select,
.sv-lindenau-form-container button,
.sv-lindenau-form-container textarea {
  box-sizing: border-box;
  font-family: inherit !important;
}

/* Header */
.sv-header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sv-border-light);
}

.sv-lindenau-form-container h2.sv-title,
.sv-lindenau-form-container .sv-title,
h2.sv-title,
.sv-title {
  margin: 0 0 6px 0 !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  display: block !important;
  font-family: inherit !important;
  height: auto !important;
  min-height: 28px !important;
}

.sv-subtitle {
  margin: 0 !important;
  font-size: 14px !important;
  color: var(--sv-text-muted) !important;
  line-height: 1.45 !important;
}

/* Step Indicator */
.sv-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
  padding: 0 6px;
}

.sv-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  cursor: pointer;
  background: transparent;
}

.sv-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--sv-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  border: 1.5px solid var(--sv-border);
  transition: var(--sv-transition);
}

.sv-step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--sv-text-muted);
  margin-top: 6px;
  transition: var(--sv-transition);
}

.sv-step-item.active .sv-step-num {
  background: var(--sv-primary);
  color: #ffffff;
  border-color: var(--sv-primary);
  box-shadow: 0 0 0 3px var(--sv-primary-subtle);
}

.sv-step-item.active .sv-step-label {
  color: var(--sv-primary);
  font-weight: 600;
}

.sv-step-item.completed .sv-step-num {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.sv-step-divider {
  flex: 1;
  height: 2px;
  background: var(--sv-border-light);
  margin: 0 10px;
  position: relative;
  top: -10px;
}

/* Form Steps */
.sv-form-step {
  display: none;
}

.sv-form-step.active {
  display: block;
}

.sv-step-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 18px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sv-border-light);
}

.sv-step-desc {
  font-size: 13.5px;
  color: var(--sv-text-muted);
  margin: -8px 0 16px 0;
}

/* Form Controls */
.sv-form-group {
  margin-bottom: 18px;
}

.sv-form-row {
  display: flex;
  gap: 14px;
}

.sv-col-4 { flex: 4; }
.sv-col-6 { flex: 6; }
.sv-col-8 { flex: 8; }

.sv-label {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 6px;
  color: #334155;
}

.sv-required {
  color: var(--sv-error);
}

.sv-field-help {
  margin: -2px 0 8px 0;
  font-size: 12px;
  color: var(--sv-text-muted);
  line-height: 1.4;
}

.sv-input, .sv-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius-sm);
  background: #ffffff;
  color: var(--sv-text-main);
  transition: var(--sv-transition);
  outline: none;
  font-family: inherit;
}

.sv-input:focus, .sv-select:focus {
  border-color: var(--sv-border-focus);
  box-shadow: 0 0 0 3px var(--sv-focus-ring);
}

.sv-input.sv-error-input {
  border-color: var(--sv-error) !important;
  background-color: #fef2f2;
}

/* Radio Group Cards */
.sv-radio-group {
  display: flex;
  gap: 12px;
}

.sv-radio-card {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius-sm);
  cursor: pointer;
  transition: var(--sv-transition);
  user-select: none;
  background: #ffffff;
}

.sv-radio-card:hover {
  border-color: var(--sv-primary);
  background: #fafafa;
}

.sv-radio-card input {
  display: none;
}

.sv-radio-custom {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 2px solid var(--sv-border);
  border-radius: 50%;
  margin-right: 10px;
  display: inline-block;
  position: relative;
  transition: var(--sv-transition);
}

.sv-radio-card input:checked + .sv-radio-custom {
  border-color: var(--sv-primary);
  background: #ffffff;
}

.sv-radio-card input:checked + .sv-radio-custom::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--sv-primary);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.sv-radio-card:has(input:checked) {
  border-color: var(--sv-primary);
  background: var(--sv-primary-subtle);
}

.sv-radio-text {
  font-size: 13.5px;
  color: var(--sv-text-main);
}

/* Inline Radios */
.sv-radio-inline {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 6px;
}

.sv-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
  color: var(--sv-text-main);
}

.sv-radio-option input[type="radio"] {
  accent-color: var(--sv-primary);
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

/* Fee Calculator & Bank Notice Box */
.sv-fee-calculator-box {
  margin-top: 20px;
  border: 1px solid var(--sv-border-light);
  border-radius: var(--sv-radius);
  background: var(--sv-bg-subtle);
  padding: 16px 18px;
}

.sv-fee-header {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sv-border-light);
}

.sv-fee-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sv-fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: #334155;
}

.sv-fee-val {
  font-weight: 600;
  color: #0f172a;
}

.sv-fee-total-row {
  border-top: 1px solid var(--sv-border);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--sv-primary);
}

.sv-fee-total-row .sv-fee-val {
  font-size: 16px;
  color: var(--sv-primary);
  font-weight: 700;
}

.sv-fee-recurring-row {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--sv-border);
  font-size: 12px;
  color: var(--sv-text-muted);
}

.sv-fee-hint {
  margin-top: 10px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid var(--sv-border-light);
  border-radius: var(--sv-radius-sm);
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}

.sv-fee-bank-notice {
  margin-top: 12px;
  padding: 10px 12px;
  background: #ffffff;
  border-left: 3px solid var(--sv-primary);
  border-radius: var(--sv-radius-sm);
  border-top: 1px solid var(--sv-border-light);
  border-right: 1px solid var(--sv-border-light);
  border-bottom: 1px solid var(--sv-border-light);
  font-size: 12.5px;
  color: #1e293b;
  line-height: 1.5;
}

.sv-bank-title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.sv-bank-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sv-bank-item {
  color: #334155;
}

/* Consent Boxes */
.sv-consent-box {
  background: #fafafa;
  border: 1px solid var(--sv-border-light);
  border-radius: var(--sv-radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.sv-consent-title {
  font-weight: 600;
  font-size: 13.5px;
  color: #0f172a;
  display: block;
  margin-bottom: 4px;
}

.sv-consent-desc {
  font-size: 13px;
  color: var(--sv-text-muted);
  line-height: 1.45;
  margin: 0 0 10px 0;
}

.sv-statutes-box {
  padding: 14px 16px;
  background: var(--sv-primary-subtle);
  border: 1px solid var(--sv-primary-border);
  border-radius: var(--sv-radius-sm);
  margin-top: 20px;
}

/* Legal Accordion / Details */
.sv-legal-accordion {
  margin: 16px 0 18px 0;
}

.sv-legal-details {
  background: #f8fafc;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius-sm);
  transition: var(--sv-transition);
  overflow: hidden;
}

.sv-legal-details[open] {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05);
}

.sv-legal-summary {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  transition: var(--sv-transition);
  list-style: none;
}

.sv-legal-summary::-webkit-details-marker {
  display: none;
}

.sv-legal-summary:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.sv-legal-summary-icon {
  margin-right: 8px;
  font-size: 14px;
  flex-shrink: 0;
}

.sv-legal-summary-title {
  flex-grow: 1;
}

.sv-legal-summary-arrow {
  font-size: 18px;
  color: #64748b;
  transition: transform 0.2s ease;
  line-height: 1;
}

.sv-legal-details[open] .sv-legal-summary-arrow {
  transform: rotate(90deg);
  color: var(--sv-primary);
}

.sv-legal-content {
  padding: 14px 16px 16px 16px;
  border-top: 1px solid var(--sv-border-light);
  font-size: 12.5px;
  line-height: 1.55;
  color: #475569;
  max-height: 340px;
  overflow-y: auto;
}

.sv-legal-section {
  margin-bottom: 16px;
}

.sv-legal-section:last-child {
  margin-bottom: 0;
}

.sv-legal-section h4 {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.sv-legal-section p {
  margin: 0 0 6px 0;
}

.sv-legal-section ul {
  margin: 0 0 8px 18px;
  padding: 0;
}

.sv-legal-section li {
  margin-bottom: 4px;
}

.sv-legal-section a {
  color: var(--sv-primary);
  text-decoration: underline;
}

.sv-legal-section a:hover {
  color: var(--sv-primary-hover);
}

.sv-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.sv-checkbox-label input {
  display: none;
}

.sv-checkbox-custom {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid var(--sv-primary);
  border-radius: 4px;
  background: #ffffff;
  margin-top: 2px;
  display: inline-block;
  position: relative;
  transition: var(--sv-transition);
}

.sv-checkbox-label input:checked + .sv-checkbox-custom {
  background: var(--sv-primary);
}

.sv-checkbox-label input:checked + .sv-checkbox-custom::after {
  content: "✓";
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  position: absolute;
  top: -2px;
  left: 3px;
}

.sv-checkbox-text {
  font-size: 13px;
  line-height: 1.45;
  color: #1e293b;
}

/* Signature Area */
.sv-signature-wrapper {
  margin-bottom: 18px;
}

.sv-signature-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.sv-btn-clear {
  background: none;
  border: none;
  color: var(--sv-text-muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
}

.sv-btn-clear:hover {
  color: var(--sv-error);
}

.sv-signature-canvas-holder {
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius-sm);
  background: #ffffff;
  touch-action: none;
  overflow: hidden;
}

#sv-signature-pad,
#sv-signature-minor-pad {
  width: 100%;
  height: 170px;
  display: block;
}

.sv-minor-signature-wrapper {
  background: #f8fafc;
  padding: 16px;
  border-radius: var(--sv-radius-sm);
  border: 1px dashed var(--sv-border);
}

.sv-minor-signature-wrapper .sv-signature-canvas-holder {
  background: #ffffff;
}

.sv-signature-footer {
  text-align: center;
  font-size: 12px;
  color: var(--sv-text-muted);
  margin-top: 6px;
}

/* Step Actions & Buttons */
.sv-step-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--sv-border-light);
}

.sv-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--sv-radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--sv-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.sv-btn-next, .sv-btn-primary {
  background: var(--sv-primary);
  color: #ffffff;
}

.sv-btn-next:hover, .sv-btn-primary:hover {
  background: var(--sv-primary-hover);
}

.sv-btn-prev, .sv-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid var(--sv-border-light);
}

.sv-btn-prev:hover, .sv-btn-secondary:hover {
  background: #e2e8f0;
}

.sv-btn-submit {
  background: #0f172a;
  color: #ffffff;
  padding: 11px 24px;
}

.sv-btn-submit:hover {
  background: #1e293b;
}

/* Overlay & Messages */
.sv-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--sv-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.sv-overlay-content {
  text-align: center;
  padding: 25px;
}

.sv-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--sv-border-light);
  border-top-color: var(--sv-primary);
  border-radius: 50%;
  animation: svSpin 0.8s linear infinite;
  margin: 0 auto 16px auto;
}

@keyframes svSpin {
  to { transform: rotate(360deg); }
}

.sv-message-card {
  text-align: center;
  padding: 35px 20px;
}

.sv-message-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 16px auto;
}

.sv-success .sv-message-icon {
  background: #dcfce7;
  color: #16a34a;
}

.sv-error .sv-message-icon {
  background: #fee2e2;
  color: #dc2626;
}

.sv-message-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #0f172a;
}

.sv-message-card p {
  color: var(--sv-text-muted);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Responsive Optimization (especially Mobile / Hestia Pro) */
@media (max-width: 600px) {
  .sv-lindenau-form-container {
    padding: 20px 14px;
    margin: 15px auto;
    border-radius: var(--sv-radius-sm);
  }

  .sv-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
  }

  .sv-lindenau-form-container h2.sv-title,
  .sv-lindenau-form-container .sv-title,
  h2.sv-title,
  .sv-title {
    font-size: 20px !important;
    line-height: 1.3 !important;
    min-height: 24px !important;
    margin: 0 0 6px 0 !important;
    display: block !important;
  }

  .sv-subtitle {
    font-size: 13.5px !important;
    line-height: 1.4 !important;
  }

  .sv-steps-indicator {
    margin-bottom: 22px;
  }

  .sv-step-label {
    display: none;
  }

  .sv-step-divider {
    top: 0;
  }

  .sv-form-row {
    flex-direction: column;
    gap: 0;
  }

  .sv-radio-group {
    flex-direction: column;
    gap: 8px;
  }

  .sv-step-actions {
    flex-direction: row;
    gap: 10px;
  }

  .sv-btn {
    width: 100%;
    padding: 11px 14px;
    font-size: 13.5px;
  }

  .sv-btn-submit {
    width: 100%;
  }

  #sv-signature-pad {
    height: 140px;
  }
}
