/* ============================================================
   Talk Anchor — Row anchors, copy button, highlight animation
   ============================================================ */

/* Scroll offset: keep the target row 100px below the viewport top so it
   doesn't hide behind sticky navigation bars. */
tr[id^="talk-"] {
    scroll-margin-top: 100px;
}

/* --- Yellow highlight animation on anchor navigation --- */
@keyframes talkRowHighlight {
    0%   { background-color: #fff59d; }
    60%  { background-color: #fff59d; }
    100% { background-color: transparent; }
}

/* Apply animation to every cell so it works regardless of per-cell backgrounds */
tr.talk-anchor-highlight > td {
    animation: talkRowHighlight 1.4s ease-out forwards;
}

/* Permanent dashed outline on the currently-active anchor row.
   Uses outline (not border) so table layout is not affected. */
tr.talk-anchor-active {
    outline: 2px dashed #f59e0b;
    outline-offset: -1px;
}

/* --- Copy-link button column --- */
th.col-anchor-copy,
td.col-anchor-copy {
    width: 32px;
    min-width: 32px;
    padding: 4px !important;
    text-align: center;
    vertical-align: top !important;
}

.talk-anchor-copy-btn {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

/* --- Copy-link toast notification --- */
.talk-anchor-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background-color: #1f2937;
    color: #f9fafb;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 99999;
}

.talk-anchor-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.talk-anchor-copy-btn:hover,
.talk-anchor-copy-btn:focus {
    color: #2563eb;
    background-color: #eff6ff;
    border-color: #bfdbfe;
    outline: none;
}

.talk-anchor-copy-btn.copied {
    color: #16a34a;
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

/* Hide copy button column when printing */
@media print {
    th.col-anchor-copy,
    td.col-anchor-copy {
        display: none !important;
    }
}
