/* ============================================================
   FIJNE FORMULIEREN - SHARED PUBLIC FORM STYLES
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

.ff-body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  background: #f5f5f5;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  color: #333;
}

.ff-form-wrapper {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
}

/* Header image */
.ff-header-image-wrapper {
  width: 100%;
  max-height: 240px;
  overflow: hidden;
}

.ff-header-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Header text */
.ff-header {
  padding: 32px 36px 0;
}

.ff-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ff-description {
  font-size: 17px;
  color: #666;
  margin-bottom: 0;
}

/* Form */
.ff-form {
  padding: 24px 36px 36px;
}

.ff-field {
  margin-bottom: 20px;
}

.ff-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.ff-required {
  color: #dc2626;
  margin-left: 2px;
}

.ff-input,
.ff-textarea,
.ff-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 17px;
  font-family: inherit;
  background: #fff;
  color: #333;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ff-input:focus,
.ff-textarea:focus,
.ff-select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.ff-textarea {
  resize: vertical;
  min-height: 100px;
}

.ff-select {
  appearance: none;
  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='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Options (radio/checkbox) */
.ff-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ff-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.15s, border-color 0.15s;
}

.ff-option:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.ff-option input {
  accent-color: #4f46e5;
}

/* Submit button */
.ff-submit {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 8px;
}

.ff-submit:hover {
  background: #4338ca;
}

.ff-submit:active {
  transform: scale(0.98);
}

/* Empty state */
.ff-empty {
  text-align: center;
  color: #9ca3af;
  padding: 20px;
  font-style: italic;
}

/* Thank you page */
.ff-thank-you {
  text-align: center;
  padding: 60px 36px;
}

.ff-checkmark {
  color: #16a34a;
  margin-bottom: 20px;
}

.ff-thank-you .ff-title {
  margin-bottom: 12px;
}

.ff-thank-you .ff-description {
  max-width: 400px;
  margin: 0 auto;
}

.ff-redirect-btn {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 36px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.ff-redirect-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* Server-side validation summary */
.ff-validation-summary {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  color: #991b1b;
  font-size: 14px;
}

.ff-validation-summary strong {
  display: block;
  margin-bottom: 8px;
}

.ff-validation-summary ul {
  margin: 0;
  padding-left: 20px;
}

.ff-validation-summary li {
  margin-bottom: 2px;
}

/* Client-side validation errors */
.ff-error {
  color: #dc2626;
  font-size: 13px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ff-error::before {
  content: '⚠';
  font-size: 12px;
}

.ff-input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1) !important;
}

/* Embed mode */
.ff-body.ff-embed {
  padding: 0;
  background: transparent;
  min-height: auto;
  overflow: auto;
}

.ff-embed .ff-form-wrapper {
  box-shadow: none;
  border-radius: 0;
  max-width: none;
}

/* Font-size: klein */
.ff-font-klein .ff-title { font-size: 22px; }
.ff-font-klein .ff-description { font-size: 14px; }
.ff-font-klein .ff-label { font-size: 13px; }
.ff-font-klein .ff-input,
.ff-font-klein .ff-textarea,
.ff-font-klein .ff-select { font-size: 14px; padding: 8px 12px; }
.ff-font-klein .ff-option { font-size: 13px; padding: 6px 10px; }
.ff-font-klein .ff-submit { font-size: 15px; padding: 12px 20px; }

/* Font-size: groot */
.ff-font-groot .ff-title { font-size: 34px; }
.ff-font-groot .ff-description { font-size: 20px; }
.ff-font-groot .ff-label { font-size: 19px; }
.ff-font-groot .ff-input,
.ff-font-groot .ff-textarea,
.ff-font-groot .ff-select { font-size: 20px; padding: 14px 16px; }
.ff-font-groot .ff-option { font-size: 18px; padding: 12px 16px; }
.ff-font-groot .ff-submit { font-size: 21px; padding: 18px 28px; }

/* Responsive */
@media (max-width: 640px) {
  .ff-body { padding: 0; }
  .ff-form-wrapper { border-radius: 0; min-height: 100vh; box-shadow: none; }
  .ff-header { padding: 24px 20px 0; }
  .ff-form { padding: 20px 20px 32px; }
  .ff-title { font-size: 24px; }
  .ff-font-groot .ff-title { font-size: 28px; }
}
