/* mw-attach — styling for MwAttachmentField pieces that aren't the thumbnail grid.
   Currently the inline voice-note tiles + their playback popover. Global (unscoped) class names
   prefixed mw-attach-*; the popover reuses the chat's mw-chat-voice* player styling (mw-chat.css). */

.mw-attach-voice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mw-attach-voice-anchor {
    position: relative;
    display: inline-flex;
}

/* The square indicator: a play glyph over the duration, tap to open the playback popover */
.mw-attach-voice-tile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.mw-attach-voice-tile:hover {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-background-grey));
}

.mw-attach-voice-tile:active { transform: scale(0.96); }

.mw-attach-voice-tile--open {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, var(--mud-palette-background-grey));
}

.mw-attach-voice-tile-icon {
    font-size: 22px !important;
    color: var(--mud-palette-primary);
}

.mw-attach-voice-tile-time {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: var(--mud-palette-text-secondary);
}

/* Transparent full-viewport catcher so any outside click closes the popover */
.mw-attach-voice-scrim {
    position: fixed;
    inset: 0;
    z-index: 1199;
    background: transparent;
}

.mw-attach-voice-pop {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    min-width: 240px;
}
