/* LVBL Form Builder – flat moderno */
.lvbl-fb {
  --lvbl-fb-focus: #1f5132;
  background: #fff;
  color: #1a1a1a;
  border-radius: 12px;
  padding: 28px;
  border: 1px solid #e1e3e6;
  box-sizing: border-box;
  width: 100%;
}
.lvbl-fb *, .lvbl-fb *::before, .lvbl-fb *::after { box-sizing: border-box; }

.lvbl-fb__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.lvbl-fb[data-cols="2"] .lvbl-fb__grid {
  grid-template-columns: 1fr 1fr;
}
.lvbl-fb[data-cols="2"] .lvbl-fb__field[data-col="2"] { grid-column: 1 / -1; }

.lvbl-fb__field { min-width: 0; display: flex; flex-direction: column; }
.lvbl-fb__label {
  display: block;
  font-size: .85em;
  margin-bottom: 6px;
  font-weight: 600;
}
.lvbl-fb__req { color: #c0392b; font-weight: 700; margin-left: 2px; }

.lvbl-fb input[type="text"],
.lvbl-fb input[type="email"],
.lvbl-fb input[type="tel"],
.lvbl-fb input[type="number"],
.lvbl-fb input[type="date"],
.lvbl-fb select,
.lvbl-fb textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e1e3e6;
  background: #fff;
  color: #1a1a1a;
  border-radius: 8px;
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.lvbl-fb select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23667' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.lvbl-fb input:focus,
.lvbl-fb select:focus,
.lvbl-fb textarea:focus {
  border-color: var(--lvbl-fb-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lvbl-fb-focus) 18%, transparent);
}
.lvbl-fb textarea { resize: vertical; min-height: 110px; }

.lvbl-fb__choices { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.lvbl-fb__choices.is-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.lvbl-fb__choices label,
.lvbl-fb__acceptance label {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: .95em;
}
.lvbl-fb__acceptance { padding: 4px 0; }

/* Upload moderno */
.lvbl-fb__drop {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px dashed #d0d4d9;
  background: #fafbfc;
  border-radius: 10px;
  padding: 26px;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .05s;
  position: relative;
}
.lvbl-fb__drop:hover { border-color: var(--lvbl-fb-focus); background: #fff; }
.lvbl-fb__drop.is-dragging {
  border-color: var(--lvbl-fb-focus);
  background: color-mix(in srgb, var(--lvbl-fb-focus) 6%, #fff);
}
.lvbl-fb__drop input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.lvbl-fb__drop-icon { display: inline-flex; flex: 0 0 auto; }
.lvbl-fb__drop-icon svg { display: block; }
.lvbl-fb__drop-text {
  display: flex; flex-direction: column; gap: 2px; font-size: .92em; line-height: 1.3;
}
.lvbl-fb__drop-text strong { font-weight: 600; }
.lvbl-fb__drop-text em {
  font-style: normal; opacity: .7; font-size: .88em;
}
.lvbl-fb__drop.has-files strong::after {
  content: " ✓";
  color: #1b7a3a;
}

.lvbl-fb__btn {
  margin-top: 18px;
  width: 100%;
  background: #1f5132;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 16px 22px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  transition: filter .15s, transform .05s;
}
.lvbl-fb__btn:hover { filter: brightness(.95); }
.lvbl-fb__btn:active { transform: translateY(1px); }
.lvbl-fb__btn[disabled] { opacity: .65; cursor: not-allowed; }
.lvbl-fb__btn-icon { display: inline-flex; }
.lvbl-fb__btn-icon svg { display: block; }

.lvbl-fb__msg {
  margin-top: 12px; font-size: .92em; min-height: 1.2em; text-align: center;
}
.lvbl-fb__msg.is-ok  { color: #1b7a3a; }
.lvbl-fb__msg.is-err { color: #c0392b; }

@media (max-width: 782px) {
  .lvbl-fb { padding: 18px; }
  .lvbl-fb[data-cols="2"] .lvbl-fb__grid { grid-template-columns: 1fr; }
  .lvbl-fb__choices.is-grid { grid-template-columns: 1fr; }
}
