/* ConsultADHD — keyboard focus + Tab-hold shortcuts */

/* Skip to content */
.skip-link {
    position: absolute;
    left: 16px;
    top: 0;
    z-index: 10000;
    transform: translateY(-120%);
    background: #0B2F23;
    color: #fff !important;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 18px;
    border-radius: 0 0 12px 12px;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(11, 47, 35, 0.25);
    transition: transform 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
    outline: 3px solid #FFE566;
    outline-offset: 3px;
}

/* Strong focus only while keyboard navigating */
html.user-is-tabbing *:focus {
    outline: none;
}
html.user-is-tabbing *:focus-visible {
    outline: 3px solid #039172 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(3, 145, 114, 0.28) !important;
}
html.user-is-tabbing .btn-preassess:focus-visible,
html.user-is-tabbing .btn-contact:focus-visible,
html.user-is-tabbing .a11y-fab:focus-visible,
html.user-is-tabbing .cookie-btn-primary:focus-visible {
    outline-color: #FFE566 !important;
    box-shadow: 0 0 0 6px rgba(255, 229, 102, 0.45) !important;
}
html.user-is-tabbing .nav-link:focus-visible,
html.user-is-tabbing .navbar-brand:focus-visible {
    border-radius: 8px;
    background: rgba(3, 145, 114, 0.12);
}

/* Hold-Tab overlay tip */
.kbd-tip {
    position: fixed;
    z-index: 9800;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(640px, calc(100vw - 32px));
    background: #0B2F23;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 16px 40px rgba(11, 47, 35, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
    animation: kbdTipIn 0.18s ease both;
}
.kbd-tip strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.kbd-tip > span {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 10px;
}
.kbd-tip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}
.kbd-tip-list li {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.kbd-tip kbd,
.kbd-badge {
    font-family: 'DM Sans', sans-serif;
    font-weight: 800;
    font-size: 0.72rem;
    line-height: 1;
    background: #FFE566;
    color: #0B2F23;
    border-radius: 6px;
    padding: 4px 7px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}
@keyframes kbdTipIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Number badges on targets while Tab is held */
.kbd-target {
    position: relative;
}
.kbd-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    z-index: 5;
    min-width: 22px;
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: opacity 0.12s, transform 0.12s;
}
html.kbd-hold .kbd-badge {
    opacity: 1;
    transform: scale(1);
}
html.kbd-hold .kbd-target {
    box-shadow: 0 0 0 3px rgba(255, 229, 102, 0.85), 0 0 0 6px rgba(11, 47, 35, 0.35);
    border-radius: 10px;
}
html.kbd-hold .btn-preassess.kbd-target,
html.kbd-hold .btn-contact.kbd-target {
    border-radius: 50px;
}

.kbd-flash {
    animation: kbdFlash 0.35s ease;
}
@keyframes kbdFlash {
    0%, 100% { filter: none; }
    40% { filter: brightness(1.25); }
}

/* Dim the rest of the page slightly while shortcuts are shown */
html.kbd-hold body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(11, 47, 35, 0.12);
    z-index: 9000;
    pointer-events: none;
}
html.kbd-hold .site-navbar,
html.kbd-hold .topbar,
html.kbd-hold #a11yRoot,
html.kbd-hold footer {
    position: relative;
    z-index: 9001;
}
/* Tip must stay fixed in the viewport (do not inherit relative from above) */
#kbdTip.kbd-tip,
html.kbd-hold #kbdTip {
    position: fixed !important;
    z-index: 10050 !important;
    top: 16px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
}

html[data-a11y-motion] .kbd-tip,
html[data-a11y-motion] .kbd-badge,
html[data-a11y-motion] .kbd-flash {
    animation: none !important;
    transition: none !important;
}

/* Main landmark focus (skip link target) */
#main-content:focus {
    outline: none;
}
#main-content:focus-visible {
    outline: none;
}
