/* Blackbit design system (tokens and components), applied to the plain HTML that Twig and the Symfony form theme render. */

@font-face { font-family: "Titillium Web"; src: url("../fonts/titillium-web-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Titillium Web"; src: url("../fonts/titillium-web-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Titillium Web"; src: url("../fonts/titillium-web-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
    --bb-yellow: #fbe800;
    --bb-black: #000000;
    --bb-white: #ffffff;
    --bb-grey-dark: #999999;
    --bb-hairline: #cccccc;

    --bb-line-hair: 1px solid var(--bb-hairline);
    --bb-line-normal: 1px solid var(--bb-grey-dark);
    --bb-line-bold: 3px solid var(--bb-yellow);

    --bb-field-h: 40px;
    --bb-field-w: 232px;
    --bb-field-gap: 15px;

    --bb-h1: clamp(2rem, 1.3rem + 2.4vw, 2.5rem);
    --bb-h2: clamp(1.5rem, 1.1rem + 1.4vw, 1.8125rem);
    --bb-copy: 1.156rem;
    --bb-copy-small: 0.875rem;

    --font-web: "Titillium Web", sans-serif;
    --font-ui: "Nunito Sans", "Titillium Web", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-web);
    font-weight: 300;
    font-size: var(--bb-copy);
    line-height: 1.46;
    color: var(--bb-black);
    background: var(--bb-white);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

h1, h2 { font-weight: 700; margin: 0 0 16px; }
h1 { font-size: var(--bb-h1); line-height: 1.15; overflow-wrap: anywhere; }
h2 { font-size: var(--bb-h2); line-height: 1.275; margin-top: 48px; }
p { margin: 0 0 16px; max-width: 70ch; }
strong, b { font-weight: 700; }

a { color: var(--bb-black); text-decoration: underline; text-underline-offset: 3px; }
a:hover { background: var(--bb-yellow); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--bb-black); outline-offset: 2px; }

code { font-family: ui-monospace, monospace; font-size: 1.1em; font-weight: 400; background: var(--bb-yellow); padding: 2px 8px; }

/* ---------- Header and page frame ---------- */

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 32px;
    padding: 16px 24px;
    border-bottom: var(--bb-line-bold);
}
.site-header__brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.site-header__brand:hover { background: none; }
.site-header__logo { height: 40px; display: block; }
.site-header__title, .ui {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.site-header__user { margin-left: auto; font-size: var(--bb-copy-small); }

main { flex: 1 0 auto; width: 100%; max-width: 1280px; margin: 0 auto; padding: 48px 24px 96px; }

.back { font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.back a { text-decoration: none; }
.back a::before { content: "← "; }

#notice { background: var(--bb-yellow); padding: 12px 16px; max-width: none; font-weight: 400; }

/* ---------- Lists of links (organizations, help) ---------- */

.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); border-top: var(--bb-line-hair); border-left: var(--bb-line-hair); }
.tiles li { border-right: var(--bb-line-hair); border-bottom: var(--bb-line-hair); }
.tiles a { display: block; padding: 20px 24px; font-weight: 700; text-decoration: none; }
.tiles a::after { content: " →"; }

.facts { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 32px; }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th {
    text-align: left;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 8px 12px;
    border-bottom: var(--bb-line-normal);
    white-space: nowrap;
}
td { padding: 10px 12px; border-bottom: var(--bb-line-hair); vertical-align: middle; }
td form { margin: 0; }

/* ---------- Forms (Symfony form_div_layout) ---------- */

form > div > div, form > div:not([id]) { margin-bottom: var(--bb-field-gap); }
label { display: block; font-weight: 400; margin-bottom: 4px; }

input[type="text"], input[type="password"], select {
    height: var(--bb-field-h);
    width: 100%;
    max-width: calc(2 * var(--bb-field-w));
    border: 1px solid var(--bb-grey-dark);
    border-radius: 0;
    padding: 0 16px;
    background: var(--bb-white);
    color: var(--bb-black);
    font-family: var(--font-web);
    font-weight: 300;
    font-size: var(--bb-copy);
}
input:hover, select:hover { border-color: var(--bb-black); }
input:focus, select:focus { border-color: var(--bb-black); outline: 2px solid var(--bb-yellow); outline-offset: 0; }

.help-text { font-size: var(--bb-copy-small); margin-top: 4px; }

form ul { list-style: none; margin: 0 0 8px; padding: 8px 12px; border-left: var(--bb-line-bold); font-weight: 400; }
#group-error, [role="alert"] { border-left: var(--bb-line-bold); padding: 8px 12px; font-weight: 400; }

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--bb-field-h);
    min-width: var(--bb-field-w);
    padding: 0 24px;
    border: 0;
    border-radius: 0;
    background: var(--bb-black);
    color: var(--bb-white);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}
button:hover { background: var(--bb-yellow); color: var(--bb-black); }

/* Row actions inside tables and lists: quiet outline buttons. */
td button, #aliases button {
    height: 32px;
    min-width: 0;
    padding: 0 12px;
    font-size: 12px;
    background: transparent;
    color: var(--bb-black);
    border: 1px solid var(--bb-black);
}
td button:hover, #aliases button:hover { background: var(--bb-black); color: var(--bb-yellow); }

.actions a { font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }

#aliases { list-style: none; padding: 0; margin: 0 0 32px; }
#aliases li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: var(--bb-line-hair); max-width: calc(3 * var(--bb-field-w)); }
#aliases form > div { display: contents; }

dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 24px; }
dt { font-weight: 700; }
dd { margin: 0; }

/* ---------- Login ---------- */

.login { max-width: calc(2 * var(--bb-field-w)); margin: 48px auto 0; }
.login label { margin-top: var(--bb-field-gap); }
.login button { margin-top: 24px; }

@media (max-width: 640px) {
    .site-header__title { display: none; }
    main { padding-top: 32px; }
}

.cta {
    display: inline-flex;
    align-items: center;
    height: var(--bb-field-h);
    padding: 0 24px;
    background: var(--bb-yellow);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}
.cta:hover { background: var(--bb-black); color: var(--bb-yellow); }

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 24px;
    padding: 24px;
    border-top: var(--bb-line-hair);
    font-size: var(--bb-copy-small);
}
