/* מילנר TV — feature: hidden (hide channels, categories, countries) */

#fx-btn-manage { margin-inline-start: auto; margin-inline-end: 4px; }

/* Row buttons: only in manage mode */
.fx-hide-btn {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin-inline-start: auto;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--dur-fast), color var(--dur-fast);
}

.fx-hide-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }

body.fx-manage .fx-hide-btn { display: flex; }

.channel-tile { position: relative; }

.channel-tile > .fx-hide-btn {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    margin: 0;
    width: 28px;
    height: 28px;
}

/* Manage bar */
.fx-manage-bar {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 8px;
    flex-shrink: 0;
}

body.fx-manage .fx-manage-bar { display: flex; }

.fx-manage-bar [hidden] { display: none; }

.fx-manage-text {
    flex: 1 1 100%;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Panel */
.fx-hidden-section { padding: 6px 16px 10px; }

.fx-hidden-title {
    margin: 8px 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.fx-hidden-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.fx-hidden-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    color: var(--text-primary);
}

.fx-hidden-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.fx-hidden-all {
    display: block;
    margin: 14px 16px 20px;
    width: calc(100% - 32px);
}

/* Home link */
.fx-hidden-link {
    display: block;
    margin: 8px auto 20px;
    padding: 6px 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.fx-hidden-link:hover { color: var(--text-primary); text-decoration: underline; }
.fx-hidden-link[hidden] { display: none; }

/* Wide layouts turn #channel-section into a grid with named areas
   (css/styles.css, "Desktop / TV"). Give the manage bar its own row there,
   between the chips row and the list; without this it is auto-placed below
   the list. */
@media (min-width: 900px), (min-width: 560px) and (max-height: 480px) {
    body.fx-manage #channel-section {
        grid-template-rows: auto auto auto minmax(0, 1fr);
        grid-template-areas:
            "title  search search"
            "chips  chips  bar"
            "manage manage manage"
            "list   list   list";
    }

    .fx-manage-bar {
        grid-area: manage;
        padding-inline: var(--section-pad, 16px);
    }

    .fx-manage-text { flex: 0 1 auto; margin-inline-end: 8px; }
}
