/* Form fields and chips: helpmecto-web/static/css/components/contact-form.css. */

.form { display: grid; gap: 20px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form__status:empty { display: none; }
.form__status { color: var(--red); font-size: .9rem; }
@media (max-width: 640px) { .form__grid { grid-template-columns: 1fr; } }

.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field__label { color: var(--text-2); font-size: .82rem; font-weight: 600; }
.field__label em { color: var(--muted); font-style: normal; font-weight: 400; }
.field__hint { color: var(--muted); font-size: .8rem; }
.field input, .field select, .field textarea {
    width: 100%; min-height: 48px; padding: 12px 14px;
    border: 1px solid var(--line-2); border-radius: var(--radius-sm);
    background: var(--bg); color: var(--text);
    transition: border-color .18s, box-shadow .18s;
}
.field textarea { resize: vertical; min-height: 96px; }
/* Selects: our own chevron (helpmecto's site-switch style) with room on the right, instead of the cramped native arrow. */
.field select {
    appearance: none; -webkit-appearance: none; padding-right: 46px; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
    background-size: 6px 6px; background-repeat: no-repeat;
}
.field select:disabled { cursor: not-allowed; opacity: .6; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }

.fieldset { margin: 0; padding: 0; border: 0; }
.fieldset legend { margin-bottom: 12px; color: var(--text); font-weight: 650; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); font-size: .88rem; font-weight: 550; transition: all .18s; }
.chip:hover span { border-color: var(--overlay-7); color: var(--text); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.chip input:checked + span::before { content: "✓"; color: var(--accent); font-weight: 800; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Large selectable option (module picker) */
.option-card { position: relative; display: block; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card__body { display: grid; gap: 8px; height: 100%; padding: 20px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); transition: border-color .2s, background .2s; }
.option-card__body strong { display: flex; align-items: center; justify-content: space-between; font-size: 1.02rem; }
.option-card__body strong::after { content: ""; width: 20px; height: 20px; border: 1px solid var(--line-2); border-radius: 50%; }
.option-card__body span { color: var(--text-2); font-size: .9rem; }
.option-card input:checked + .option-card__body { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-tint), transparent 70%), var(--panel); }
.option-card input:checked + .option-card__body strong::after { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8 3 3 5-6' fill='none' stroke='%23140a03' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.option-card input:focus-visible + .option-card__body { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-flash { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .92rem; }
.form-flash--success { background: var(--green-tint); color: var(--green); }
.form-flash--error { background: var(--red-tint); color: var(--red); }
