/* Відео-інструкції: кнопка в кабінеті / на подачі і вікно з плеєром у стилі VexaMarket (js/tutorial-videos.js) */
.vm-tut-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border: 1px solid #fed7aa; border-radius: 999px;
    background: #fff7ed; color: #c2410c; font: inherit; font-size: 14px; font-weight: 700;
    cursor: pointer; text-decoration: none; transition: background .15s ease, border-color .15s ease;
}
.vm-tut-btn:hover { background: #ffedd5; border-color: #fdba74; color: #9a3412; }
.vm-tut-btn:focus-visible { outline: 2px solid #ff6600; outline-offset: 2px; }
.vm-tut-btn .fa-circle-play { font-size: 16px; color: #ff6600; }
.profile-tabs .vm-tut-btn { margin-left: auto; align-self: center; }
/* На подачі кнопка стоїть праворуч у ряду перемикача «Швидко / Звичайно» */
.vm-tut-row { display: flex; justify-content: flex-end; margin: -60px 0 16px; pointer-events: none; }
.vm-tut-row .vm-tut-btn { pointer-events: auto; }

/* ---------- вікно ---------- */
html.vm-tut-open { overflow: hidden; }
.vm-tut {
    --t-bg: #0f172a; --t-card: #172033; --t-line: rgba(255, 255, 255, .08); --t-ink: #f8fafc; --t-muted: #94a3b8; --t-brand: #ff6600;
    position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 16px;
    color-scheme: dark;
}
.vm-tut[hidden] { display: none; }
.vm-tut__backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, .78); backdrop-filter: blur(4px); }
.vm-tut__box {
    position: relative; width: min(1220px, 100%); max-height: calc(100vh - 32px); overflow: auto;
    background: var(--t-bg); color: var(--t-ink); border-radius: 22px; border: 1px solid var(--t-line);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55); scrollbar-color: rgba(255, 102, 0, .45) transparent;
}
.vm-tut__head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--t-line); }
.vm-tut__logo {
    flex: 0 0 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: var(--t-brand); color: #fff; font-weight: 900; font-size: 22px; letter-spacing: -.04em; box-shadow: 0 6px 18px rgba(255, 102, 0, .35);
}
.vm-tut__titles { flex: 1; min-width: 0; }
.vm-tut__kicker { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--t-brand); }
.vm-tut__title { font-size: 20px; font-weight: 800; line-height: 1.2; color: var(--t-ink); }
.vm-tut__close { flex: 0 0 40px; height: 40px; border: 1px solid var(--t-line); border-radius: 12px; background: rgba(255, 255, 255, .06); color: var(--t-ink); cursor: pointer; font-size: 16px; }
.vm-tut__close:hover { background: rgba(255, 255, 255, .12); }
.vm-tut__body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; padding: 18px 20px 20px; }

/* ---------- плеєр ---------- */
.vm-tut__player { position: relative; border-radius: 16px; overflow: hidden; background: #020617; }
/* Панель керування під відео, а не поверх: у роликах субтитри внизу кадру */
.vm-tut__player.is-vertical { width: min(100%, calc((100vh - 280px) * .5625)); margin: 0 auto; }
.vm-tut__player video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #020617; cursor: pointer; }
.vm-tut__player.is-vertical video { aspect-ratio: 9 / 16; }
.vm-tut__big {
    position: absolute; left: 50%; top: calc(50% - 29px); width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 50%;
    background: var(--t-brand); color: #fff; font-size: 30px; cursor: pointer; box-shadow: 0 10px 30px rgba(255, 102, 0, .45);
    opacity: 0; transform: scale(.8); transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.vm-tut__big .fa-play { margin-left: 5px; }
.vm-tut__player.is-paused .vm-tut__big { opacity: 1; transform: scale(1); pointer-events: auto; }
.vm-tut__ctrl {
    display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 12px;
    background: #0b1222; border-top: 1px solid var(--t-line);
}
.vm-tut__cb { flex: 0 0 auto; min-width: 38px; height: 38px; padding: 0 8px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.vm-tut__cb:hover { background: rgba(255, 102, 0, .85); }
.vm-tut__time { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: #e2e8f0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vm-tut__bar { position: relative; flex: 1; min-width: 60px; margin: 0 9px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .2); cursor: pointer; touch-action: none; }
.vm-tut__bar::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
.vm-tut__buf { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: rgba(255, 255, 255, .25); }
.vm-tut__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: var(--t-brand); }
.vm-tut__fill i { position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--t-brand); }
.vm-tut__bar:focus-visible { outline: 2px solid var(--t-brand); outline-offset: 4px; }
.vm-tut__lang { margin-top: 10px; font-size: 13px; color: var(--t-muted); }

/* ---------- список роликів ---------- */
.vm-tut__list { display: flex; flex-direction: column; gap: 8px; }
.vm-tut__list-h { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--t-muted); padding: 2px 4px 4px; }
.vm-tut__item {
    display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px; text-align: left; color: var(--t-ink);
    border: 1px solid var(--t-line); border-radius: 14px; background: var(--t-card); cursor: pointer; font: inherit;
    transition: border-color .15s ease, background .15s ease;
}
.vm-tut__item:hover { border-color: rgba(255, 102, 0, .5); }
.vm-tut__item.is-active { border-color: var(--t-brand); background: rgba(255, 102, 0, .12); }
.vm-tut__thumb { position: relative; flex: 0 0 116px; height: 65px; border-radius: 10px; overflow: hidden; background: #1e293b; }
.vm-tut__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vm-tut__dur { position: absolute; right: 5px; bottom: 5px; padding: 1px 6px; border-radius: 5px; background: rgba(2, 6, 23, .85); color: #fff; font-size: 11px; font-weight: 800; }
.vm-tut__now { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(255, 102, 0, .55); color: #fff; font-size: 18px; }
.vm-tut__item.is-active .vm-tut__now { display: flex; }
.vm-tut__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vm-tut__meta em { font-style: normal; font-size: 11px; font-weight: 900; color: var(--t-brand); }
.vm-tut__meta b { font-size: 14px; line-height: 1.25; color: var(--t-ink); }
.vm-tut__meta small { font-size: 12px; line-height: 1.3; color: var(--t-muted); }

@media (max-width: 860px) {
    .vm-tut { padding: 0; align-items: stretch; }
    .vm-tut__box { border-radius: 0; border: 0; max-height: 100vh; height: 100%; }
    .vm-tut__head { padding: 12px 14px; }
    .vm-tut__body { grid-template-columns: 1fr; padding: 12px; gap: 14px; }
    .vm-tut__player.is-vertical { width: min(100%, calc((100vh - 200px) * .5625)); }
    /* на телефоні смуга перемотування — окремим рядком над кнопками, щоб не наїжджала на час */
    .vm-tut__ctrl { flex-wrap: wrap; height: auto; gap: 6px; padding: 14px 10px 8px; }
    .vm-tut__bar { order: -1; flex: 1 0 calc(100% - 16px); margin: 0 8px 6px; }
    .vm-tut__time { font-size: 12px; margin-right: auto; }
    .vm-tut-row { margin: 0 0 12px; justify-content: flex-start; }
    .profile-tabs .vm-tut-btn { margin-left: 0; }
}
