/* YouTube in Shani (/youtube): search, the player, video and channel grids; plus the settings mark, the statistics
   thumbnails and Wrapped's card. */

.yt-mark { background: #ff0033; color: #fff; }
.yt-mark .icon { width: 20px; height: 20px; }
img.account__avatar { object-fit: cover; }

.yt-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.yt-search > .icon { color: var(--ink-muted); font-size: 1.2rem; flex: none; }
.yt-search input { flex: 1; min-width: 0; }

.yt-player { padding: 0; overflow: hidden; margin-bottom: 20px; }
.yt-player__frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.yt-player__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-player__info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px 14px;
}
.yt-player__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.yt-player__title { margin: 0; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.yt-player__text .text-button { align-self: flex-start; padding: 0; }
.yt-player__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.yt-player__actions a.secondary-button { text-decoration: none; }

.yt-shorts { max-width: 260px; margin-bottom: 12px; }
.yt-heading { display: flex; align-items: center; gap: 8px; }

.yt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
    gap: 18px 14px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
.yt-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.yt-card__play {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.yt-card__thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-2);
}
.yt-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease; }
.yt-card__play:hover .yt-card__thumb img, .yt-card__play:focus-visible .yt-card__thumb img { transform: scale(1.04); }
.yt-card.is-playing .yt-card__thumb { outline: 3px solid var(--accent); outline-offset: -3px; }
.yt-card__badge {
    position: absolute;
    right: 6px;
    bottom: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgb(0 0 0 / 78%);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 600;
}
.yt-card__badge--live { background: #cc0000; }
.yt-card__badge--now { background: var(--accent); }
.yt-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.93rem;
    line-height: 1.3;
}
.yt-card__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; color: var(--ink-muted); font-size: 0.82rem; }
.yt-card__channel { padding: 0; font-size: inherit; color: inherit; }
.yt-card__channel:hover { color: var(--ink); }

.yt-channels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
    gap: 12px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
.yt-channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    padding: 16px 10px;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: center;
    cursor: pointer;
}
.yt-channel img, .yt-channel__none {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
}
.yt-channel__none { display: grid; place-items: center; color: var(--ink-muted); font-size: 1.6rem; }
.yt-channel strong { font-size: 0.92rem; line-height: 1.25; overflow-wrap: anywhere; }
.yt-channel small { color: var(--ink-muted); font-size: 0.78rem; }

.yt-stats__thumb { flex: none; display: block; width: 72px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.yt-stats__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.wrapped__card--youtube { --w1: #2a0508; --w2: #e5182c; --w3: #ffb3b8; }
