/*
 * Read-info marker
 *
 * The 👀 marker appended after the title link of listing cards the reader has
 * already viewed, and the explanatory dialog it opens. Injected by
 * js/read-info.js; the dialog markup is partials/read-info-dialog.html.
 *
 * The marker replaces the earlier whole-card opacity fade (too subtle to
 * register). The dialog mirrors the settings dialog chrome for coherence.
 */

/* Marker button — a single-colour SVG eye sitting inline after the title
   link, in the heading colour. Raised slightly off the baseline so it sits
   visually centred against the title text. */
.read-marker {
    background: transparent;
    border: none;
    padding: 0;
    margin-inline-start: 0.4em;
    cursor: pointer;
    line-height: 0;
    color: var(--color-primary-dark);
    display: inline-flex;
    align-items: center;
    vertical-align: 0.16em;
    opacity: 0;
    animation: nzwr-read-mark 0.3s ease-out 0.05s forwards;
}

.read-marker svg {
    width: 0.92em;
    height: 0.92em;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes nzwr-read-mark {
    to { opacity: 0.85; }
}

.read-marker:hover {
    opacity: 1;
}

.read-marker:focus-visible {
    outline: 1px solid var(--color-primary);
    outline-offset: 2px;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .read-marker {
        animation: none;
        opacity: 0.85;
    }
}

/* Dialog — centred via margin: auto (native <dialog> positioning) */
.read-info-dialog {
    margin: auto;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-bg);
    color: var(--color-ink);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    width: min(380px, calc(100vw - 2rem));
    max-height: calc(100vh - 4rem);
    padding: 0;
    overflow-y: auto;
}

.read-info-dialog::backdrop {
    background: rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .read-info-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.read-info-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.read-info-dialog-title {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-ink);
    margin: 0;
}

.read-info-dialog-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-ink-muted);
    font-size: 1.3rem;
    line-height: 1;
    padding: 0;
}

.read-info-dialog-close:hover {
    color: var(--color-primary);
}

.read-info-dialog-body {
    padding: var(--space-md);
}

.read-info-dialog-body p {
    margin: 0 0 var(--space-sm);
    line-height: 1.5;
}

.read-info-dialog-body p:last-child {
    margin-bottom: 0;
}

/* Dialog footer — hosts the hide action, mirrors the settings dialog footer */
.read-info-dialog-footer {
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--color-border);
}

.read-info-hide {
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    color: var(--color-ink-muted);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
}

.read-info-hide:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

@media (max-width: 720px) {
    .read-info-dialog {
        width: calc(100vw - 2rem);
    }
}
