.freeshow-file-library,
.freeshow-browser {
    margin: 1.5rem 0;
}

.freeshow-browser-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.freeshow-browser-header h2 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
}

.freeshow-browser-count {
    color: #6b7280;
    font-size: 0.92rem;
    white-space: nowrap;
}

.freeshow-browser-playlist-link {
    margin: -0.25rem 0 0.85rem;
    text-align: right;
}

.freeshow-browser-playlist-link a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 5px 12px 5px 6px;
    border-radius: 8px;
    background: #1db954;
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.freeshow-browser-playlist-link img {
    width: 34px;
    height: 34px;
    border-radius: 5px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.16);
}

.freeshow-browser-playlist-logo {
    display: inline-flex;
    width: 18px;
    height: 18px;
    color: #fff;
}

.freeshow-browser-playlist-logo svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.freeshow-browser-playlist-link a:hover,
.freeshow-browser-playlist-link a:focus,
.freeshow-browser-playlist-link a:visited {
    background: #169c46;
    color: #fff !important;
}

.freeshow-file-library-search,
.freeshow-browser-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.freeshow-file-library-search input,
.freeshow-browser-search input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.freeshow-file-library-search button,
.freeshow-browser-search button,
.freeshow-browser-filters button {
    height: 42px;
    padding: 0 14px;
    border: 1px solid #111827;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    cursor: pointer;
}

.freeshow-browser-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 1rem;
}

.freeshow-browser-filters select {
    min-height: 36px;
    max-width: 190px;
    padding: 0 30px 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 0.9rem;
}

.freeshow-browser-filters button {
    height: 36px;
    font-size: 0.9rem;
}

.freeshow-browser-reset {
    color: #6b7280;
    font-size: 0.9rem;
    text-decoration: none;
}

.freeshow-browser-reset[hidden] {
    display: none !important;
}

.freeshow-browser-reset:hover {
    color: #111827;
    text-decoration: underline;
}

.freeshow-file-library-list,
.freeshow-browser-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #e5e7eb;
    width: 100%;
    overflow-x: auto;
}

.freeshow-file-library-item,
.freeshow-browser-row {
    padding: 13px 0;
    border-bottom: 1px solid #e5e7eb;
    background: transparent;
}

.freeshow-browser-item[hidden],
.freeshow-browser-empty[hidden] {
    display: none !important;
}

.freeshow-browser-row {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(110px, 0.8fr) minmax(130px, 1fr) minmax(115px, 0.8fr) minmax(142px, max-content);
    gap: 14px;
    align-items: center;
    min-width: 827px;
    min-height: 42px;
}

.freeshow-browser-row > * {
    min-width: 0;
}

.freeshow-browser-row-head {
    padding: 9px 0;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.freeshow-file-library-type {
    display: none;
}

.freeshow-browser-item-header {
    min-width: 0;
}

.freeshow-browser-item-header > div {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.freeshow-browser-title {
    display: block;
    min-width: 0;
    margin-bottom: 0;
    color: #111827;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.freeshow-browser-cell {
    min-width: 0;
}

.freeshow-browser-muted {
    color: #6b7280;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.freeshow-browser-muted:empty::before {
    content: "—";
    color: #d1d5db;
}

.freeshow-browser-row > * {
    justify-self: center;
    text-align: center;
}

.freeshow-browser-sort,
.freeshow-browser-actions-head {
    color: #6b7280;
    text-decoration: none;
}

.freeshow-browser-row > :nth-child(1),
.freeshow-browser-row > :nth-child(3) {
    width: 100%;
}

.freeshow-browser-sort:hover,
.freeshow-browser-sort.is-active {
    color: #111827;
}

.freeshow-browser.is-js-enhanced .freeshow-browser-search button,
.freeshow-browser.is-js-enhanced .freeshow-browser-filters button {
    display: none;
}

.freeshow-browser-subtitle,
.freeshow-file-library-meta small {
    color: #6b7280;
    font-size: 0.82rem;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.freeshow-browser-details,
.freeshow-browser-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    color: #6b7280;
    font-size: 0.8rem;
}

.freeshow-browser-details {
    display: none;
}

.freeshow-browser-details span + span::before {
    content: "•";
    margin-right: 10px;
    color: #d1d5db;
}

.freeshow-browser-metadata {
    display: none;
}

.freeshow-browser-pill {
    padding: 3px 7px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
}

.freeshow-browser-actions {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.freeshow-browser-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 9px;
    border-radius: 6px;
    border: 0;
    color: #4b5563;
    text-decoration: none;
    background: transparent;
    font-size: 0.86rem;
    line-height: 1;
}

.freeshow-browser-action-icon {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 999px;
}

.freeshow-browser-action-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.freeshow-browser-action-placeholder {
    visibility: hidden;
    pointer-events: none;
}

.freeshow-browser-action:hover {
    background: #f3f4f6;
}

.freeshow-browser-action-primary {
    background: #2271b1;
    color: #fff !important;
}

.freeshow-browser-action-primary:visited,
.freeshow-browser-action-primary:focus,
.freeshow-browser-action-primary:hover {
    background: #135e96;
    color: #fff !important;
}

.freeshow-file-library-empty {
    margin: 0;
    padding: 16px;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
    font-style: italic;
}

@media (max-width: 640px) {
    .freeshow-browser-header,
    .freeshow-file-library-search,
    .freeshow-browser-search {
        display: block;
    }

    .freeshow-browser-count {
        margin-top: 4px;
    }

    .freeshow-file-library-search input,
    .freeshow-browser-search input,
    .freeshow-file-library-search button,
    .freeshow-browser-search button {
        width: 100%;
        margin-top: 8px;
    }

    .freeshow-browser-list {
        overflow-x: visible;
    }

    .freeshow-browser-row-head {
        display: none;
    }

    .freeshow-browser-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        min-width: 0;
        min-height: 0;
        gap: 8px 10px;
    }

    .freeshow-browser-item-header,
    .freeshow-browser-item-header > div {
        display: block;
    }

    .freeshow-browser-title,
    .freeshow-browser-subtitle {
        display: block;
        white-space: normal;
    }

    .freeshow-browser-muted {
        display: none;
    }

    .freeshow-browser-actions {
        margin-top: 0;
        flex-direction: row;
        align-items: stretch;
    }
}
