/* form.css — styles for rendered forms (Fill page + Office preview). Depends on tokens.css. */
.fpage { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; animation: slideup .22s ease; }
.field { grid-column: 1 / -1; }
.field.w-half { grid-column: span 1; }
@media (max-width: 560px) { .field.w-half { grid-column: 1 / -1; } }
.field .flabel { font-size: 15.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; display: block; }
.field .req { color: var(--pink); margin-left: 4px; }
.field .fhelp { color: var(--ink3); font-size: 13.5px; margin: -4px 0 8px; }
.field .ferr { color: var(--red); font-size: 13px; min-height: 0; margin-top: 6px; }
.field.has-error input, .field.has-error textarea, .field.has-error select, .field.has-error .choices .choice, .field.has-error .sigpad { border-color: var(--bad-line); box-shadow: 0 0 0 1px rgba(255,138,138,.4); }
.fheading { font-size: 20px; font-weight: 800; padding-top: 8px; border-top: 1px solid var(--line2); margin-top: 4px; }
.field.type-heading:first-child .fheading { border-top: 0; padding-top: 0; margin-top: 0; }
.fpara { color: var(--ink2); background: var(--panel2); border-left: 3px solid var(--violet2); padding: 10px 14px; border-radius: 0 10px 10px 0; margin: 0; }

/* choices */
.choices { display: grid; gap: 8px; grid-template-columns: 1fr; }
.choices.stores { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choices.yesno { grid-template-columns: 1fr 1fr; }
.choice { justify-content: flex-start; text-align: left; background: var(--panel); border: 1px solid var(--input-line); border-radius: 12px; padding: 12px 14px; font-weight: 600; color: var(--ink2); gap: 10px; width: 100%; transition: .15s; }
.choice small { display: block; color: var(--ink3); font-size: 12px; font-weight: 500; }
.choice span { flex: 1; }
.choice i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--input-line); flex: none; position: relative; transition: .15s; }
.choice i.box { border-radius: 5px; }
.choice:hover { border-color: var(--blue); background: var(--panel2); color: var(--ink); }
.choice.on { border-color: var(--blue); color: #fff; background: linear-gradient(135deg, rgba(21,94,239,.35), rgba(113,55,220,.35)); box-shadow: 0 0 0 1px var(--blue), 0 0 18px rgba(21,94,239,.35); }
.choice.on i { border-color: #fff; background: var(--neon); }
.choice.on i::after { content: ''; position: absolute; inset: 4px; border-radius: inherit; background: #fff; }
.choice.on i.box::after { inset: 3px; border-radius: 2px; }
.choices.stores .choice { flex-direction: column; align-items: flex-start; gap: 2px; }
.choices.yesno .choice { justify-content: center; text-align: center; font-size: 16px; padding: 14px; }
.choices.yesno .choice.yes.on { background: linear-gradient(135deg, rgba(74,222,128,.28), rgba(21,94,239,.28)); border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok), 0 0 18px rgba(74,222,128,.3); }
.choices.yesno .choice.no.on { background: linear-gradient(135deg, rgba(255,138,138,.28), rgba(113,55,220,.28)); border-color: var(--bad-c); box-shadow: 0 0 0 1px var(--bad-c), 0 0 18px rgba(255,138,138,.3); }

/* stars */
.stars { display: flex; align-items: center; gap: 4px; }
.star { background: transparent; font-size: 34px; line-height: 1; padding: 2px 4px; color: var(--track); text-shadow: none; transition: .12s; }
.star:hover { background: transparent; transform: scale(1.12); color: var(--ink3); }
.star.on { color: var(--amber); text-shadow: 0 0 12px rgba(255,211,122,.55); }
.starval { margin-left: 8px; color: var(--ink3); font-weight: 700; font-size: 14px; }

/* scale */
.scale-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.sc { min-width: 40px; height: 40px; padding: 0 8px; background: var(--panel); border: 1px solid var(--input-line); border-radius: 10px; color: var(--ink2); font-weight: 700; }
.sc:hover { border-color: var(--blue); background: var(--panel2); }
.sc.on { background: var(--neon); color: #fff; border-color: transparent; box-shadow: 0 0 16px rgba(113,55,220,.5); }
.scale-labels { display: flex; justify-content: space-between; color: var(--ink3); font-size: 12.5px; margin-top: 6px; }

/* signature */
.sigpad { background: var(--panel); border: 1px dashed var(--input-line); border-radius: 12px; overflow: hidden; position: relative; }
.sigpad.has { border-style: solid; border-color: var(--blue); }
.sigpad canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: crosshair; background: repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.04) 39px 40px); }
.sig-tools { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-top: 1px solid var(--line2); }

/* files */
.filebox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filebox .files { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.filechip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px 6px 6px; font-size: 13px; max-width: 100%; }
.filechip img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.filechip b { width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; }
.filechip .fn { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filechip .rm { background: transparent; padding: 2px 8px; font-size: 16px; color: var(--ink3); }
.filechip .rm:hover { color: var(--red); background: transparent; }
.filechip.uploading { opacity: .7; }

/* progress */
.progress { height: 6px; background: var(--track); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--neon); border-radius: inherit; transition: width .3s ease; box-shadow: 0 0 12px rgba(113,55,220,.6); }
