.voice-detector [hidden] {
    display: none !important;
}

.voice-detector .vd-file {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
    align-items: center;
    gap: 12px;
    padding: 12px 0 0;
}

.voice-detector .vd-file-info {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    overflow-wrap: anywhere;
}

.voice-detector audio, .voice-detector .vd-progress {
    width: 100%;
    min-width: 0;
}

.voice-detector .vd-privacy,
.voice-detector .vd-actions,
.voice-detector .vd-progress {
    margin-block-start: 12px;
}

.voice-detector .vd-progress {
    accent-color: #2563eb;
}

.voice-detector .vd-clip {
    padding-inline: 12px;
    border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 8px;
}

.voice-detector .vd-clip > summary bdi, .voice-detector #vd-analyzed-range {
    margin-inline-start: 8px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.voice-detector .vd-clip[open] {
    padding-block-end: 12px;
}

.voice-detector .vd-clip-fields {
    grid-template-columns: repeat(2, minmax(0, 12rem));
    gap: 8px 12px;
}

.voice-detector .vd-clip-fields input {
    min-width: 0;
    width: 100%;
}

.voice-detector .vd-clip-actions {
    margin-block-start: 12px;
}

.voice-detector .vd-result {
    margin-block-start: 16px;
    padding: clamp(16px, 3vw, 28px);
    border: 1px solid currentColor;
    border-color: color-mix(in srgb, currentColor 19%, transparent);
    border-radius: 12px;
}

.voice-detector .vd-result h2 {
    font-size: 1.1rem;
    font-weight: 650;
}

.voice-detector .vd-number {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 750;
    line-height: 1.16;
    font-variant-numeric: tabular-nums;
    margin-block: 4px;
}

.voice-detector meter {
    display: block;
    width: min(100%, 28rem);
    height: 14px;
    margin-block: 8px;
    accent-color: #2563eb;
}

.voice-detector meter::-webkit-meter-optimum-value {
    background: #2563eb;
}

.voice-detector meter::-moz-meter-bar {
    background: #2563eb;
}

.voice-detector .vd-guidance {
    max-width: 60ch;
    margin-block-start: 12px;
}

.voice-detector details {
    margin-block-start: 16px;
}

.voice-detector summary, .voice-detector .vd-seek {
    cursor: pointer;
    font-weight: 600;
}

.voice-detector summary {
    min-height: 44px;
    padding-block: 10px;
}

.voice-detector #vd-segments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 8px;
    margin-block-start: 8px;
    padding: 0;
    list-style: none;
}

.voice-detector .vd-segment {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    padding: 6px 10px;
    gap: 8px;
    border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
}

.voice-detector .vd-seek {
    text-decoration: underline;
    min-height: 32px;
}

@media (max-width: 600px) {
    .voice-detector .vd-file {
        grid-template-columns: minmax(0, 1fr);
    }
}
