/*
 * "Sérðu villu?" at an article's foot (contact/_error_report.html, site/villa/villa.js), on every outlet. Of the article
 * head's family (site/article-head/article-head.css): its colours from the text's (currentColor), so it is right on white,
 * on an opinion piece's tint, in the dark look and in each outlet's; the fields and the quiet button filled in the outlet's
 * grey (--st-fill, else a tint of the text), no outlines; Senda filled in the ink; the page's own type.
 */
.villa {
    --villa-tint: var(--st-fill, color-mix(in srgb, currentColor 6%, transparent));
    --villa-tint-hover: var(--st-fill-hover, color-mix(in srgb, currentColor 12%, transparent));
    --villa-muted: color-mix(in srgb, currentColor 66%, transparent);
    --villa-ground: var(--base-bg, var(--st-bg, #fff));
    margin: 28px 0;
    font-family: inherit;
}
.villa *, .villa *::before, .villa *::after { box-sizing: border-box; }

/* The line */
.villa__line { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; line-height: 1.4; color: var(--villa-muted); }
.villa__line svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.villa .villa__open {
    color: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px;
    text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; cursor: pointer;
}
.villa .villa__open:hover, .villa .villa__open[aria-expanded="true"] { color: var(--base-ink, currentColor); text-decoration-color: currentColor; }
.villa__open:focus { outline: none; }
.villa__open:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }

/* The form under it */
.villa__fold { max-width: 560px; margin-top: 14px; }
.villa__fold[hidden], .villa__form[hidden], .villa__thanks[hidden], .villa__error[hidden] { display: none; }
.villa__form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.villa__field { display: flex; flex-direction: column; gap: 6px; }
.villa__label { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.villa__optional { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--villa-muted); }
.villa__input {
    display: block; width: 100%; margin: 0; padding: 11px 14px; border: 0; border-radius: 12px;
    background: var(--villa-tint); color: inherit; font: inherit; font-size: 16px; line-height: 1.45;
    box-shadow: none; appearance: none;
}
textarea.villa__input { min-height: 104px; resize: vertical; }
.villa__input:focus { outline: 2px solid currentColor; outline-offset: 0; }
.villa__input::placeholder { color: var(--villa-muted); opacity: 1; }
.villa__hint { font-size: 13px; line-height: 1.4; color: var(--villa-muted); }
.villa__to { margin: 0; font-size: 14px; line-height: 1.45; color: var(--villa-muted); }
.villa__to b { color: var(--base-ink, currentColor); font-weight: 700; }
.villa__error { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 15px; line-height: 1.4; background: #fde4e1; color: #5c1610; }
[data-theme="dark"] .villa__error { background: rgba(255, 120, 100, .16); color: inherit; }
.villa .villa__line + .villa__error { margin-top: 10px; }

/* The buttons: Senda in the ink, the other in the grey */
.villa__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.villa__send, .villa__cancel {
    display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 20px; border: 0;
    border-radius: 999px; font: inherit; font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; transition: background .12s, filter .12s;
}
.villa__send { color: inherit; background: currentColor; }
.villa__send > span { color: var(--villa-ground); }
.villa__send:hover { filter: brightness(1.25); }
.villa__send:disabled { cursor: progress; opacity: .6; }
.villa__cancel { color: inherit; background: var(--villa-tint); }
.villa__cancel:hover { background: var(--villa-tint-hover); }
.villa__send:focus, .villa__cancel:focus { outline: none; }
.villa__send:focus-visible, .villa__cancel:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Thanks, in the form's place */
.villa__thanks { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border-radius: 14px; background: var(--villa-tint); }
.villa__thanks:focus { outline: none; }
.villa__thanks p { margin: 0; font-size: 15px; line-height: 1.45; }
.villa__thanks .villa__cancel { background: var(--villa-ground); }
