/* bi-subset.css — Bootstrap Icons.
 *
 * TEMPORARY: this pulls the FULL bootstrap-icons stylesheet (~120 KiB font) from
 * the CDN. The original plan was a 42-icon subset (~6 KiB) generated by
 * tools/build-bi-subset.py, but that build output (bi-subset.css + bi-subset.woff2)
 * was lost and Python/fonttools isn't available to regenerate it right now.
 *
 * To restore the lightweight subset later:
 *     pip install fonttools brotli
 *     python tools/build-bi-subset.py
 * That overwrites this file + creates bi-subset.woff2. Upload both.
 *
 * Keeping the filename `bi-subset.css` means none of the 12 PHP pages that
 * <link> to it need to change — just upload this one file.
 */
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

/* Re-declare the bootstrap-icons @font-face with font-display:swap. The CDN
 * stylesheet above declares it without font-display (defaults to `block` —
 * Lighthouse "Font display" flags this). This later, same-family declaration
 * wins, so icons swap in instead of blocking render. */
@font-face {
    font-family: "bootstrap-icons";
    src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/fonts/bootstrap-icons.woff2") format("woff2");
    font-display: swap;
}

/* ---------------------------------------------------------------------------
 * Action-button classes — same look as the header login button
 * (.btn .btn-outline-primary .rounded-pill): transparent pill, coloured
 * outline, fills on hover. Centralized here so every page just writes
 * class="weblink-add" instead of repeating a Bootstrap utility chain.
 *   .weblink-add    blue   — create/add actions
 *   .weblink-edit   grey   — edit actions
 *   .weblink-delete red    — delete actions
 *   .weblink-view   subtle underlined text link (real <a>, crawlable)
 *   .weblink-icon   borderless icon-only button (.danger = red on hover)
 * ------------------------------------------------------------------------- */
.weblink-add,
.weblink-edit,
.weblink-delete {
    display: inline-block;
    background: transparent;
    border: 1px solid;
    border-radius: 50rem;
    padding: .25rem .75rem;
    font-size: .875rem;
    line-height: 1.5;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}
/* Colours use Bootstrap 5.3's theme-aware *-text-emphasis variables: dark hues
   on the light theme, light hues on the dark theme — so the text/border keep a
   sufficient contrast ratio in both (raw #0d6efd/#6c757d/#dc3545 failed on the
   dark card backgrounds). */
.weblink-add    { color: var(--bs-primary-text-emphasis);   border-color: var(--bs-primary-text-emphasis); }
.weblink-edit   { color: var(--bs-secondary-text-emphasis); border-color: var(--bs-secondary-text-emphasis); }
.weblink-delete { color: var(--bs-danger-text-emphasis);    border-color: var(--bs-danger-text-emphasis); }
.weblink-add:hover,    .weblink-add:focus    { background-color: #0d6efd; color: #fff; }
.weblink-edit:hover,   .weblink-edit:focus   { background-color: #6c757d; color: #fff; }
.weblink-delete:hover, .weblink-delete:focus { background-color: #dc3545; color: #fff; }

/* Subtle text-link variant for "view all"-style navigation. */
.weblink-view {
    color: var(--bs-primary-text-emphasis);
    text-decoration: underline;
    cursor: pointer;
}
.weblink-view:hover, .weblink-view:focus {
    color: var(--bs-primary-text-emphasis);
    background-color: rgba(13, 110, 253, .08);
    border-radius: .2rem;
}

/* Icon-only action button — no border/padding, just a hoverable icon. */
.weblink-icon {
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
    line-height: 1;
}
.weblink-icon:hover, .weblink-icon:focus { color: var(--bs-primary-text-emphasis); }
.weblink-icon.danger:hover, .weblink-icon.danger:focus { color: var(--bs-danger-text-emphasis); }
