/* ceos-db#317 - identifier badge strip.
   One quiet line under the record title on missionsummary / instrumentsummary /
   agencysummary: an Identifier tag, the canonical slug as a pill with a copy
   control, an Aliases tag with any alias slugs as lighter pills, and a link to
   the explainer. Shared by all three pages so the rules live in one place. */

/* The strip belongs to the card header, not to the body it happens to sit in.
   .card-body's own padding-top is 1rem, so the negative top margin leaves 0.5rem
   of air under the header bar; the 0.25rem below adds to the following row's
   .mt-3 (1rem) so the strip is visibly closer to the header than to the first
   sub-bar rather than floating midway between the two. */
.identifier-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-top: -0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.9em;
    line-height: 1.5;
}

/* The same strip inline in the constellation roster headline on a head-mission
   page: it sits inside the sentence beside the constellation name rather than on
   a line of its own, so the block margins go and the type steps down a little. */
.identifier-strip.identifier-strip-inline {
    display: inline-flex;
    margin-top: 0;
    margin-bottom: 0;
    vertical-align: middle;
    font-size: 0.85em;
}

.identifier-strip code {
    font-size: inherit;
    color: inherit;
    background: none;
    padding: 0;
    word-break: break-all;
}

/* The Identifier / Aliases tags: name each half of the strip. */
.identifier-strip-tag {
    padding: 0.1rem 0.5rem;
    border-radius: 0.2rem;
    background-color: #e9ecef;
    color: #6c757d;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: help;
}

/* The canonical slug. */
.identifier-strip-chip {
    padding: 0.1rem 0.65rem;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    background-color: #f8f9fa;
    color: #343a40;
    cursor: help;
}

/* A combination chip inside an Instruments / Missions list row (ceos-db#383): smaller and set
   off from the row text, so the row still reads as the record it names. */
.instrument-row .identifier-strip-chip,
.mission-row .identifier-strip-chip {
    margin-left: 0.4rem;
    font-size: 0.85em;
    vertical-align: middle;
}

/* The chip's <code> outside a strip would otherwise take Bootstrap's pink code colour. */
.instrument-row .identifier-strip-chip code,
.mission-row .identifier-strip-chip code {
    font-size: inherit;
    color: inherit;
    background: none;
    padding: 0;
}

/* ceos-db#383 - every identifier chip opens the registry view of that identifier. The anchor
   sits inside the chip, so it takes the chip's colour and loses the link underline; the
   underline comes back on hover and focus as the only sign that the code is a link. No
   .identifier-strip ancestor in the selector: the same class dresses the example identifiers
   in the explainer, which are inline in a sentence rather than in a strip. */
.identifier-strip-link,
.identifier-strip-link:hover,
.identifier-strip-link:focus {
    color: inherit;
    text-decoration: none;
}

.identifier-strip-link:hover code,
.identifier-strip-link:focus code {
    text-decoration: underline;
}

/* Aliases: same shape, lighter, so the canonical slug still reads first. */
.identifier-strip-alias {
    padding: 0.05rem 0.6rem;
    border: 1px solid #edeff1;
    border-radius: 0.75rem;
    background-color: #fbfcfd;
    color: #868e96;
    font-size: 0.95em;
    cursor: help;
}

.identifier-strip-copy {
    padding: 0 0.15rem;
    border: 0;
    background: none;
    color: #adb5bd;
    font-size: 0.9em;
    line-height: 1;
    cursor: pointer;
}

.identifier-strip-copy:hover,
.identifier-strip-copy:focus {
    color: #495057;
}

.identifier-strip-copy-done {
    display: none;
    color: #6c757d;
    font-size: 0.9em;
}

.identifier-strip-copy.is-copied .identifier-strip-copy-done {
    display: inline;
}

/* Font Awesome runs in SVG-with-JS mode site-wide, so the <i> is an <svg> by
   the time the copied state is toggled - hide whichever is there. */
.identifier-strip-copy.is-copied i,
.identifier-strip-copy.is-copied svg {
    display: none;
}

/* The explainer link: a named destination rather than a bare icon, but quiet
   enough that it never competes with the slug it sits beside. */
.identifier-strip-info {
    margin-left: 0.15rem;
    color: #868e96;
    font-size: 0.9em;
    text-decoration: none;
}

.identifier-strip-info i,
.identifier-strip-info svg {
    margin-right: 0.2rem;
}

.identifier-strip-info:hover,
.identifier-strip-info:focus {
    color: #495057;
    text-decoration: underline;
}
