:root {
    --accent: #1a4c8b;
    --error: #b3261e;
    --ok: #2e7d32;
    --border: #c9c9c9;
    --text: #1c1c1c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: #f4f5f7;
    line-height: 1.5;
}

.form-page {
    max-width: 760px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
}

h1 {
    margin-top: 0;
    color: var(--accent);
}

.intro {
    color: #555;
}

fieldset {
    border: 1px solid var(--border);
    border-radius: 6px;
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem 1.25rem;
}

legend {
    font-weight: 600;
    color: var(--accent);
    padding: 0 0.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin: 0.75rem 0 0.25rem;
}

/* Symfony adds .required to labels of mandatory fields. */
label.required::after,
.required-marker {
    color: #b3261e;
}

label.required::after {
    content: " *";
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="file"],
textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font: inherit;
}

textarea {
    resize: vertical;
}

.help-block,
.hint {
    color: #666;
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.counter {
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
}

.counter--ok {
    color: var(--ok);
}

.counter--error {
    color: var(--error);
}

.collection-list {
    list-style: none;
    margin: 0.25rem 0;
    padding: 0;
}

.collection-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.collection-item input {
    flex: 1;
}

.btn-add,
.btn-remove {
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border);
    background: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
}

.btn-submit {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap
}

.btn-submit:hover {
    background: #143a6b;
}

ul.form-error-content,
.form-error-message {
    color: var(--error);
    font-size: 0.875rem;
}

.notice {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: #eef3fa;
}

.notice--error {
    background: #fbeaea;
    color: var(--error);
}

.link-lookup {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.link-lookup__divider {
    color: #888;
    margin: 0 0 0.7rem;
}

.link-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}

.link-search label {
    margin: 0;
}

.link-search input {
    margin: 0;
}

/* The "prefill" toggle sits inline, right of the submit button. */
.link-search__option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-weight: 400;
    white-space: nowrap;
}

.link-search__option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.author-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.author-results li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.author-results__info {
    display: flex;
    flex-direction: column;
}

.author-results__name {
    font-weight: 600;
}

.author-results__email {
    color: #555;
    font-size: 0.875rem;
}

.link-copy {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.link-copy input {
    flex: 1;
}
