/* ═══════════════════════════════════════════════════════════════════════════
   قالب آریا – video-section.css
   The video section (front page). The big picture links to YouTube; the list
   picks which video it shows. Channel mode: 16:9 thumbnails with the duration,
   channel name, video count and search; the list loads more as it scrolls.
   ═══════════════════════════════════════════════════════════════════════════ */

.arya-video { --av-yt: #ff0033; --av-r: 14px; }

/* big picture (a link to YouTube) */
.arya-video__main { color: #fff; text-decoration: none; isolation: isolate; }
.arya-video__main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: transform .5s cubic-bezier(.4, 0, .2, 1), opacity .3s; }
.arya-video__main:hover img { transform: scale(1.03); opacity: 1; }
.arya-video__main::after {
    content: "";
    position: absolute;
    inset: 40% 0 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, .72), transparent);
    pointer-events: none;
}
.arya-video__play {
    position: relative;
    z-index: 3;
    width: 76px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--av-yt);
    color: #fff;
    font-size: 1.9rem;
    box-shadow: 0 10px 30px rgba(255, 0, 51, .35);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s;
}
.arya-video__main:hover .arya-video__play { transform: scale(1.08); box-shadow: 0 14px 36px rgba(255, 0, 51, .45); }
.arya-video__badge {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: .76rem;
    font-weight: 600;
    line-height: 1.6;
}
.arya-video__badge i { font-size: .68rem; opacity: .85; }
.arya-video .video-title-overlay {
    z-index: 3;
    max-width: calc(100% - 120px);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.7;
    text-wrap: pretty;
}
.arya-video__dur {
    position: absolute;
    bottom: 22px;
    inset-inline-end: 20px;
    z-index: 3;
    padding: 3px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .78);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.arya-video__dur[hidden] { display: none; }

/* side: channel head + list */
.arya-video__side { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }

.arya-video__head { display: flex; flex-direction: column; gap: 10px; }
.arya-video__chan { display: flex; align-items: center; gap: 10px; min-width: 0; }
.arya-video__chan-ico {
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--av-yt) 25%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--av-yt) 12%, transparent);
    color: var(--av-yt);
    font-size: 1.1rem;
}
.arya-video__chan-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.5; }
.arya-video__chan-text a, .arya-video__chan-text b { overflow: hidden; color: var(--text-main); font-size: .95rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.arya-video__chan-text a:hover { color: var(--accent); }
.arya-video__chan-text small { color: var(--text-muted); font-size: .78rem; }
.arya-video__search { position: relative; display: flex; align-items: center; }
.arya-video__search i { position: absolute; inset-inline-start: 14px; color: var(--text-muted); font-size: .85rem; pointer-events: none; }
.arya-video__search input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    padding-inline-start: 38px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-element);
    color: var(--text-main);
    font: inherit;
    font-size: .86rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.arya-video__search input:focus { border-color: var(--accent); background: var(--bg-card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

/* list items (buttons; both modes) */
.arya-video .playlist { scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; overscroll-behavior: contain; }
.arya-video .playlist-item {
    width: 100%;
    flex: none;
    margin: 0;
    color: inherit;
    font: inherit;
    text-align: start;
    -webkit-tap-highlight-color: transparent;
}
.arya-video .playlist-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.arya-video .playlist-item.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg-card)); }
.arya-video .playlist-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.arya-video .playlist-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-main);
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.7;
    text-wrap: pretty;
}
.arya-video .playlist-dur { color: var(--text-muted); font-size: .78rem; }

/* channel mode: wide thumbnails with the time on them */
.arya-video--channel .playlist { gap: 8px; padding-inline-end: 4px; }
.arya-video--channel .playlist-item { align-items: flex-start; padding: 6px; border-radius: var(--av-r); background: transparent; }
.arya-video--channel .playlist-item:hover { transform: none; background: var(--bg-element); border-color: transparent; }
.arya-video--channel .playlist-item.is-active { border-color: var(--accent); }
.arya-video--channel .thumb-circle { position: relative; width: 128px; height: 72px; border: 0; border-radius: 10px; background: var(--bg-element); }
.arya-video--channel .thumb-circle img { transition: transform .35s; }
.arya-video--channel .playlist-item:hover .thumb-circle img { transform: scale(1.05); }
.arya-video__tdur {
    position: absolute;
    bottom: 5px;
    inset-inline-end: 5px;
    padding: 0 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .8);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.7;
}
.arya-video__more { flex: none; padding: 12px; color: var(--text-muted); font-size: .8rem; text-align: center; }
.arya-video__more.is-loading::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-inline-end: 8px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    vertical-align: -2px;
    animation: arya-v-spin .7s linear infinite;
}
@keyframes arya-v-spin { to { transform: rotate(360deg); } }

/* wide screens: the list is as tall as the big picture and scrolls inside */
@media (min-width: 901px) {
    .arya-video--channel .arya-video__side { contain: size; height: 100%; }
    .arya-video--channel .playlist { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
}

/* admins only: why the section is empty */
.arya-video--empty { display: block; color: var(--text-muted); text-align: center; }
.arya-video--empty i { color: #ff0033; margin-inline-end: 6px; }

/* phones */
@media (max-width: 900px) {
    .arya-video--channel .playlist { max-height: 62vh; }
    .arya-video--channel .thumb-circle { width: 112px; height: 63px; }
    .arya-video__play { width: 60px; height: 42px; font-size: 1.5rem; border-radius: 13px; }
    .arya-video__badge { top: 10px; inset-inline-start: 10px; padding: 4px 10px; font-size: .72rem; }
    .arya-video__dur { bottom: 12px; inset-inline-end: 12px; font-size: .74rem; }
    .arya-video .video-title-overlay { max-width: calc(100% - 90px); }
}
@media (max-width: 480px) {
    .arya-video--channel .thumb-circle { width: 104px; height: 58px; }
    .arya-video .playlist-title { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
    .arya-video *, .arya-video *::before { transition: none !important; animation-duration: .01ms !important; }
}
