/* The CV's floating dock (cv/templates/cv/includes/dock.html), shared by all CV templates. Colors: --accent and
   --accent-2 from the CV section page (inline on <body>). */
html { scroll-behavior: smooth; }
body { padding-bottom: 96px; }  /* room for the dock */
/* Floating dock: back, section links with a sliding indicator, PDF, language */
.cv-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; }
.cv-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: 0 50%; transform: scaleX(0); }
.cv-dock {
    /* centred by margins (not left: 50% + translate), so the width is measured against the whole screen */
    position: fixed; left: 0; right: 0; bottom: 20px; z-index: 30; margin-inline: auto; width: fit-content;
    display: flex; align-items: center; gap: 6px; max-width: calc(100vw - 24px);
    padding: 6px; border-radius: 999px; line-height: 1;
    font: 600 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
    background: rgba(17, 24, 39, .82); backdrop-filter: blur(14px) saturate(160%);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.cv-dock a { color: #e5e7eb; border: 0; text-decoration: none; white-space: nowrap; }
.cv-dock__sections { position: relative; display: flex; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }  /* the sections scroll, the buttons stay */
.cv-dock__sections::-webkit-scrollbar { display: none; }
.cv-dock__sections a { position: relative; z-index: 1; padding: 9px 14px; border-radius: 999px; transition: color .2s; }
.cv-dock__sections a.active { color: #111827; }
.cv-dock__indicator { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 45%, #fff), color-mix(in srgb, var(--accent-2) 45%, #fff)); transition: transform .35s cubic-bezier(.3, .7, .2, 1), width .35s cubic-bezier(.3, .7, .2, 1); }
.cv-dock__tools { flex-shrink: 0; display: flex; align-items: center; gap: 4px; padding-left: 6px; border-left: 1px solid rgba(255, 255, 255, .15); }
.cv-dock__back { flex-shrink: 0; padding: 9px 14px 9px 12px; margin-right: 2px; border-radius: 999px; border-right: 1px solid rgba(255, 255, 255, .15) !important; }
.cv-dock__back:hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 700px) {
    .cv-dock__back span { display: none; }
    /* two rows: the buttons on top; back and the sections under them, scrolled sideways */
    .cv-dock { flex-wrap: wrap; border-radius: 22px; }
    .cv-dock__tools { order: 1; flex: 1 0 100%; justify-content: space-between; border-left: 0; padding-left: 0; }
    .cv-dock__back { order: 2; }
    .cv-dock__sections { order: 3; flex: 1 1 0; }
}
.cv-dock__pdf, .cv-dock__lang { padding: 9px 12px; border-radius: 999px; }
.cv-dock__pdf { color: #111827 !important; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.cv-dock__lang:hover, .cv-dock__sections a:not(.active):hover { background: rgba(255, 255, 255, .1); }
@media print {
    .cv-dock, .cv-progress { display: none; }
    body { padding-bottom: 0; }
}

/* Highlighting for an offer (logged-in author only, cv/highlight.py): profile buttons */
.cv-dock__highlight { display: flex; align-items: center; gap: 4px; margin-right: 4px; flex-wrap: wrap; }
.cv-dock__highlight label { cursor: pointer; }
.cv-dock__highlight input { position: absolute; opacity: 0; pointer-events: none; }
.cv-dock__highlight span { display: inline-block; padding: 7px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); }
.cv-dock__highlight input:checked + span { background: rgba(255, 255, 255, .9); color: #111827; }
.cv-dock__highlight input:focus-visible + span { outline: 2px solid var(--accent); }
.cv-dock__highlight button { padding: 7px 10px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .15); color: inherit; font: inherit; cursor: pointer; }
