/*
 * Copy box: the Sound Influences text on AI Album song pages, in a box with a
 * Copy button in its corner (lib/song-copy.mjs, assets/js/ee-copy.js). Same
 * frame as the lyrics box above it (.ee-transcript in ee-video.css).
 *
 * The copy icon button, here and at the right end of the lyrics row
 * (2026-10-21): two overlapping squares, a check once copied, and a tooltip
 * on hover and keyboard focus that Escape hides. Loaded wherever either
 * appears (base.njk).
 */

.ee-copy-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0.75rem 0 1.5rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 2px solid var(--ee-black);
    border-radius: 4px;
}

.ee-copy-box p.ee-copy-box__text {
    flex: 1 1 18rem;
    min-width: 0;
    margin: 0;
}

.ee-copy-box__button {
    flex: 0 0 auto;
}

/* ---- The copy icon button ------------------------------------------------ */

/* 44px to press, though the icon is small. Hover fills it light gray; focus
   shows the form field ring (components/ee-btn.css), so the two differ. */
.ee-copy-icon {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ee-black);
    cursor: pointer;
}

.ee-copy-icon[hidden] {
    display: none;
}

.ee-copy-icon:hover {
    background: #ececec;
    border-color: #8a8a8a;
}

.ee-copy-icon:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.ee-copy-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ee-copy-icon__done,
.ee-copy-icon.is-copied .ee-copy-icon__copy {
    display: none;
}

.ee-copy-icon.is-copied .ee-copy-icon__done {
    display: block;
}

/* The tooltip, above the button. It is part of the button, with a clear
   strip under the label, so the pointer can move up onto it. */
.ee-copy-icon__tip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    z-index: 2;
    padding-bottom: 6px;
    transform: translateX(-50%);
    visibility: hidden;
}

.ee-copy-icon__tip span {
    display: block;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--ee-black);
    color: #fff;
    font: 700 16px/1.3 'Lato', sans-serif;
    white-space: nowrap;
}

.ee-copy-icon:hover .ee-copy-icon__tip,
.ee-copy-icon:focus-visible .ee-copy-icon__tip,
.ee-copy-icon.is-copied .ee-copy-icon__tip {
    visibility: visible;
}

.ee-copy-icon.is-tip-hidden .ee-copy-icon__tip {
    visibility: hidden;
}

@media (forced-colors: active) {
    .ee-copy-icon {
        border-color: ButtonText;
    }

    .ee-copy-icon__tip span {
        border: 1px solid CanvasText;
    }
}
