/* What a machine spotted: the chips that list it and the dashed outline a
   chip draws on the photo. Shared by the photo page and the case file. */

.spot-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.spot-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    min-height: 34px;
    max-width: 100%;
    padding: 0.4rem 0.8rem;
    font: inherit;
    font-size: 0.85rem;
    line-height: 1.3;
    color: #a8a8a8;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    text-align: left;
}

button.spot-chip {
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

button.spot-chip:hover {
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.3);
}

button.spot-chip:focus-visible {
    outline: 2px solid #d8d8d8;
    outline-offset: 2px;
}

button.spot-chip[aria-pressed="true"] {
    color: #1d1d1d;
    background: #d8d8d8;
    border-color: #d8d8d8;
}

.spot-chip-count {
    color: #777;
    font-size: 0.78rem;
}

button.spot-chip[aria-pressed="true"] .spot-chip-count {
    color: #4a4a4a;
}

.spot-chip-text q {
    overflow-wrap: anywhere;
}

/* The outline on the photo. Dashed, where a person's annotation is solid;
   light with a dark edge so it shows on snow and on a night street alike. */
.spot-outline {
    position: absolute;
    z-index: 7;
    pointer-events: none;
    border: 2px dashed rgba(255,255,255,0.92);
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(0,0,0,0.6);
}

.spot-outline-name {
    position: absolute;
    left: -2px;
    bottom: 100%;
    margin-bottom: 4px;
    max-width: 60vw;
    padding: 0.15rem 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #1d1d1d;
    background: rgba(216,216,216,0.96);
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.6);
}

.spot-outline-name.inside {
    bottom: auto;
    top: 4px;
    left: 4px;
    margin: 0;
}

@media (pointer: coarse) {
    .spot-chip { min-height: 40px; padding: 0.55rem 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    button.spot-chip { transition: none; }
}

/* Link from a chip to the thing's page under /things. */
.spot-more {
    white-space: nowrap;
    margin-left: 0.25rem;
    color: #888;
    font-size: 0.8rem;
}

.spot-more:hover {
    color: #d0d0d0;
}

/* "← Dogs": the way back to a thing's page, shown when the photo was
   opened from it. */
.spot-return {
    display: inline-block;
    width: fit-content;
    align-self: flex-start;
    margin: 0.75rem 0 0.25rem 1rem;
    padding: 0.3rem 0.75rem;
    color: #b0b0b0;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
}

.spot-return:hover {
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.35);
}
