/**
 * Home page — light theme (mirrors dark layout: light canvas + gray video blocks)
 */

html.light-theme body.page-home,
body.light-theme.page-home {
    --bg-deep: #f0f2f5;
    --page-bg: #f0f2f5;
    background-color: #f0f2f5 !important;
    background-image: none !important;
}

html.light-theme,
html.light-theme body,
body.light-theme {
    --bg-deep: #f0f2f5;
    --page-bg: #f0f2f5;
    --bg-main: #f0f2f5;
    background-color: #f0f2f5 !important;
    background-image: none !important;
}

html.light-theme .main-header,
body.light-theme .main-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e8e8e8 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

html.light-theme .sidebar,
body.light-theme .sidebar {
    background-color: #ffffff !important;
    border-right: 1px solid #e8e8e8;
}

/* Orbit — светлая тема: капсулы (не как original) */
html.light-theme,
body.light-theme {
    --orbit-fade-bg: #ffffff;
    --orbit-chip-bg: #e8eaed;
    --orbit-chip-border: transparent;
    --orbit-chip-text: #3d3d3d;
    --orbit-chip-hover-bg: #dfe1e5;
    --orbit-chip-active-bg: #272727;
    --orbit-chip-active-text: #ffffff;
    --orbit-divider: #d0d4da;
}

html.light-theme .category-orbit__edge--start,
body.light-theme .category-orbit__edge--start {
    background: linear-gradient(90deg, #ffffff 0%, transparent 100%);
}

html.light-theme .category-orbit__edge--end,
body.light-theme .category-orbit__edge--end {
    background: linear-gradient(270deg, #ffffff 0%, transparent 100%);
}

html.light-theme .category-orbit .orbit-chip,
html.light-theme .category-orbit .filter-item,
body.light-theme .category-orbit .orbit-chip,
body.light-theme .category-orbit .filter-item {
    border-radius: 999px;
    border: 1px solid var(--orbit-chip-border);
    background: var(--orbit-chip-bg) !important;
    color: var(--orbit-chip-text);
    box-shadow: none !important;
}

html.light-theme .category-orbit .orbit-chip::after,
html.light-theme .category-orbit .filter-item::after,
body.light-theme .category-orbit .orbit-chip::after,
body.light-theme .category-orbit .filter-item::after {
    display: none;
}

html.light-theme .category-orbit .orbit-chip__icon,
body.light-theme .category-orbit .orbit-chip__icon {
    filter: none !important;
    opacity: 1 !important;
}

html.light-theme .category-orbit .orbit-chip.active .orbit-chip__icon,
body.light-theme .category-orbit .orbit-chip.active .orbit-chip__icon {
    filter: brightness(0) invert(1) !important;
}

html.light-theme .category-orbit .orbit-chip:hover,
html.light-theme .category-orbit .filter-item:hover,
body.light-theme .category-orbit .orbit-chip:hover,
body.light-theme .category-orbit .filter-item:hover {
    background: var(--orbit-chip-hover-bg) !important;
    color: #0f0f0f;
    border-color: #c8cdd4;
}

html.light-theme .category-orbit .orbit-chip.active,
html.light-theme .category-orbit .filter-item.active,
body.light-theme .category-orbit .orbit-chip.active,
body.light-theme .category-orbit .filter-item.active {
    background: var(--orbit-chip-active-bg) !important;
    color: var(--orbit-chip-active-text);
    border-color: transparent;
    font-weight: 600;
}

html.light-theme .category-orbit .orbit-rail-divider,
body.light-theme .category-orbit .orbit-rail-divider {
    background: var(--orbit-divider);
}

html.light-theme .category-orbit__track,
body.light-theme .category-orbit__track {
    padding-left: 16px;
}

html.light-theme .category-orbit__jump,
body.light-theme .category-orbit__jump {
    background: #ffffff !important;
    border: 1px solid #d8dce3 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

html.light-theme .category-orbit__jump-icon,
body.light-theme .category-orbit__jump-icon {
    filter: brightness(0) invert(0.35) !important;
}

/* Старые глобальные filter-item не ломают orbit */
html.light-theme .category-orbit .filter-item:hover,
body.light-theme .category-orbit .filter-item:hover {
    background: var(--orbit-chip-hover-bg) !important;
}

/* Home feed cards */
html.light-theme.page-home .main-content,
html.light-theme body.page-home .main-content,
body.light-theme.page-home .main-content {
    background: transparent;
    padding: 20px 24px 32px;
}

/* Gray video blocks (like dark #181818 cards) */
html.light-theme body.page-home #home-feed-grid > .video-card,
body.light-theme.page-home #home-feed-grid > .video-card {
    background: #e8e8e8 !important;
    border: 1px solid #d0d0d0 !important;
    border-radius: 12px !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
}

html.light-theme body.page-home #home-feed-grid > .video-card:hover,
body.light-theme.page-home #home-feed-grid > .video-card:hover {
    background: #dedede !important;
    border-color: #c0c0c0 !important;
    box-shadow: none !important;
    transform: none;
}

/* Fix gray strip: margin on .thumbnail + wrapper bg from theme-light-generated */
html.light-theme body.page-home #home-feed-grid > .video-card .thumbnail-wrapper,
body.light-theme.page-home #home-feed-grid > .video-card .thumbnail-wrapper {
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}

html.light-theme.page-home #home-feed-grid > .video-card .thumbnail,
html.light-theme body.page-home #home-feed-grid > .video-card .thumbnail,
body.light-theme.page-home #home-feed-grid > .video-card .thumbnail {
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    display: block;
    width: 100%;
}

html.light-theme.page-home #home-feed-grid > .video-card .channel-name-link,
html.light-theme body.page-home #home-feed-grid > .video-card .channel-name-link,
body.light-theme.page-home #home-feed-grid > .video-card .channel-name-link {
    color: #606060 !important;
    font-size: 14px;
    text-decoration: none;
}

html.light-theme.page-home #home-feed-grid > .video-card .channel-name-link:hover,
html.light-theme body.page-home #home-feed-grid > .video-card .channel-name-link:hover,
body.light-theme.page-home #home-feed-grid > .video-card .channel-name-link:hover {
    color: #0f0f0f !important;
}

html.light-theme body.page-home #home-feed-grid > .video-card .thumbnail-duration,
body.light-theme.page-home #home-feed-grid > .video-card .thumbnail-duration {
    bottom: 8px !important;
}

html.light-theme body.page-home #home-feed-grid > .video-card .video-details-bottom,
body.light-theme.page-home #home-feed-grid > .video-card .video-details-bottom {
    margin-top: 0 !important;
    padding: 10px 8px 10px 10px !important;
    background: transparent !important;
}

html.light-theme body.page-home #home-feed-grid > .video-card .video-title-link,
html.light-theme body.page-home #home-feed-grid > .video-card .video-title-link,
body.light-theme.page-home #home-feed-grid > .video-card .video-title-link {
    color: #0f0f0f !important;
    text-decoration: none !important;
}

html.light-theme body.page-home #home-feed-grid > .video-card .video-text,
html.light-theme body.page-home #home-feed-grid > .video-card .channel-avatar-wrapper,
body.light-theme.page-home #home-feed-grid > .video-card .video-text,
body.light-theme.page-home #home-feed-grid > .video-card .channel-avatar-wrapper {
    background: transparent !important;
}

html.light-theme.page-home #home-feed-grid > .video-card .video-title,
html.light-theme body.page-home #home-feed-grid > .video-card .video-title,
body.light-theme.page-home #home-feed-grid > .video-card .video-title {
    color: #0f0f0f !important;
    font-weight: 600;
}

html.light-theme.page-home #home-feed-grid > .video-card:hover .video-title,
html.light-theme body.page-home #home-feed-grid > .video-card:hover .video-title,
body.light-theme.page-home #home-feed-grid > .video-card:hover .video-title {
    color: #0f0f0f !important;
}

html.light-theme.page-home #home-feed-grid > .video-card .channel-name,
html.light-theme.page-home #home-feed-grid > .video-card .video-meta,
html.light-theme body.page-home #home-feed-grid > .video-card .channel-name,
html.light-theme body.page-home #home-feed-grid > .video-card .video-meta,
body.light-theme.page-home #home-feed-grid > .video-card .channel-name,
body.light-theme.page-home #home-feed-grid > .video-card .video-meta {
    color: #606060 !important;
}

html.light-theme.page-home #home-feed-grid > .video-card .context-menu-button:hover,
html.light-theme body.page-home #home-feed-grid > .video-card .context-menu-button:hover,
body.light-theme.page-home #home-feed-grid > .video-card .context-menu-button:hover {
    background-color: #f0f2f5 !important;
}

@media (min-width: 901px) {
    html.light-theme.page-home #home-feed-grid > .video-card .context-menu-dropdown.active,
    html.light-theme body.page-home #home-feed-grid > .video-card .context-menu-dropdown.active,
    body.light-theme.page-home #home-feed-grid > .video-card .context-menu-dropdown.active {
        z-index: 50 !important;
    }
}

html.light-theme.page-home .empty-page-placeholder,
html.light-theme body.page-home .empty-page-placeholder,
body.light-theme.page-home .empty-page-placeholder {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    padding: 48px 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

html.light-theme.page-home #main-page-placeholder:not(.is-visible),
html.light-theme body.page-home #main-page-placeholder:not(.is-visible),
body.light-theme.page-home #main-page-placeholder:not(.is-visible) {
    display: none !important;
}

html.light-theme.page-home .empty-page-placeholder h2,
html.light-theme body.page-home .empty-page-placeholder h2,
body.light-theme.page-home .empty-page-placeholder h2 {
    color: #0f0f0f !important;
}

html.light-theme.page-home .empty-page-placeholder p,
html.light-theme body.page-home .empty-page-placeholder p,
body.light-theme.page-home .empty-page-placeholder p {
    color: #606060 !important;
}
