/* Screen recording uploads (beta, #500). Mobile-first. */

.drop-zone__beta {
    border: 1px solid var(--blue);
    border-radius: 999px;
    color: var(--blue);
    flex: 0 0 auto;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: .1rem .5rem;
    text-transform: uppercase;
}

.drop-zone--bar .drop-zone__beta {
    margin-left: auto;
}

.screen-recording-guide {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .875rem 1rem;
}

.screen-recording-guide__title {
    color: var(--text);
    font-size: .95rem;
    font-weight: 700;
}

.screen-recording-guide__steps {
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    font-size: .875rem;
    gap: .25rem;
    line-height: 1.5;
    padding-left: 1.1rem;
}

.screen-recording__position {
    color: var(--text);
    flex-shrink: 0;
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.screen-recording__found {
    color: var(--text);
    font-size: .9rem;
    font-weight: 700;
}

.screen-recording__thumbs {
    display: grid;
    gap: .375rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.screen-recording__thumbs:empty {
    display: none;
}

.screen-recording__thumb {
    aspect-ratio: 9 / 19.5;
    border-radius: 6px;
    object-fit: cover;
    width: 100%;
}

.screen-recording__note,
.screen-recording__advice {
    color: var(--text-muted);
    font-size: .85rem;
    line-height: 1.45;
}

.screen-recording__cancel,
.screen-recording__retry {
    align-self: flex-start;
    min-height: 2.75rem;
}

/* A screen recording in the upload history: one disclosure in its day. */
.upload-row + .recording-group,
.recording-group + .upload-row,
.recording-group + .recording-group {
    border-top: 1px solid var(--border);
}

.recording-group__header {
    align-items: stretch;
    display: flex;
    transition: background .15s;
}

/* Like an upload row, the whole header highlights, including the select icon. */
.recording-group__header:hover,
.recording-group__header:has(.recording-group__toggle:focus-visible) {
    background: var(--surface-2);
}

.recording-group__select {
    align-items: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    padding: 0 0 0 .85rem;
}

.recording-group__select:disabled {
    cursor: default;
}

.recording-group__select[aria-pressed="true"] .recording-group__icon {
    background: var(--accent-dim);
    box-shadow: inset 0 0 0 2px var(--accent);
    color: var(--accent);
}

.recording-group__toggle {
    align-items: center;
    background: none;
    border: 0;
    color: var(--text);
    cursor: pointer;
    display: flex;
    flex: 1;
    gap: .75rem;
    min-height: 56px;
    min-width: 0;
    padding: .7rem .85rem;
    text-align: left;
}

.recording-group__toggle:focus-visible {
    outline: none;
}

.recording-group__select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.recording-group__icon {
    align-items: center;
    background: var(--surface-2);
    border-radius: 8px;
    color: var(--brand);
    display: flex;
    flex-shrink: 0;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.recording-group__main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.recording-group__title {
    font-size: .9rem;
    font-weight: 700;
}

.recording-group__meta,
.recording-group__end {
    color: var(--text-muted);
    font-size: .78rem;
}

.recording-group__chip {
    align-self: flex-start;
    background: var(--accent-dim);
    border-radius: 999px;
    color: var(--accent);
    font-size: .72rem;
    font-weight: 700;
    padding: .1rem .5rem;
}

.recording-group__end {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: .25rem;
}

.recording-group__chevron {
    transition: transform .15s;
}

.recording-group.is-open > .recording-group__header .recording-group__chevron {
    transform: rotate(180deg);
}

.recording-group:not(.is-open) > .recording-group__screenshots,
.recording-group__rest:not(.is-open) > .recording-group__hidden,
.recording-group__rest.is-open > .recording-group__more {
    display: none;
}

.recording-group__screenshots {
    background: color-mix(in srgb, var(--surface-2) 45%, transparent);
    border-top: 1px solid var(--border);
}

.recording-group__screenshots .upload-row {
    padding-left: 1.25rem;
}

.recording-group__more {
    align-items: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    font-size: .78rem;
    gap: .75rem;
    justify-content: space-between;
    padding: 0 .85rem 0 1.25rem;
}

.recording-group__link {
    align-items: center;
    background: none;
    border: 0;
    color: var(--brand);
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
    font: inherit;
    font-weight: 700;
    min-height: 2.75rem;
    padding: 0;
}

/* A screen of a recording under a priority heading says where it came from. */
.upload-row__recording {
    align-items: center;
    color: var(--text-muted);
    display: inline-flex;
    font-size: .74rem;
    gap: .3rem;
}

.medal-upload-checks {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: .85rem;
    overflow-wrap: anywhere;
}

.medal-upload-checks p {
    margin: 0;
}

.medal-upload-checks__header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .75rem;
    justify-content: space-between;
}

.medal-upload-checks__title {
    color: var(--text);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.medal-upload-checks__date {
    color: var(--text-muted);
    font-size: .8rem;
}

.medal-upload-checks__status {
    align-items: center;
    color: var(--text);
    display: flex;
    flex-wrap: wrap;
    font-size: .9rem;
    gap: .3rem;
}

.medal-upload-checks__status--missing .medal-upload-checks__status-icon,
.medal-upload-checks__status--missing .medal-upload-checks__result {
    color: var(--accent);
}

.medal-upload-checks__status--complete .medal-upload-checks__status-icon,
.medal-upload-checks__status--complete .medal-upload-checks__result {
    color: var(--green);
}

.medal-upload-checks__result {
    font-weight: 600;
}

.medal-upload-checks__meta {
    color: var(--text-muted);
}

.medal-upload-checks__status-icon {
    flex-shrink: 0;
}

.medal-upload-checks__help {
    align-items: center;
    color: var(--text-muted);
    display: flex;
    font-size: .8rem;
    gap: .35rem;
    line-height: 1.5;
}

@media (min-width: 601px) {
    .screen-recording__thumbs {
        grid-template-columns: repeat(10, minmax(0, 1fr));
    }
}
