/*
 * Popup hướng dẫn tải video đã mua (PaidVideoDownloadHelper). Nạp ở cả view cũ
 * video/personalPaid.php và view DS video-personal-paid.blade.php, nên tự khai biến màu,
 * không dựa vào token --vbuy-* (chỉ có trong #search-result) hay bootstrap.
 * Điện thoại: sheet trượt từ đáy. Máy tính: hộp giữa màn hình.
 */
.vdl-help, .vdl-modal {
    --vdl-blue: #1F5D8C;
    --vdl-ink: #16232e;
    --vdl-muted: #62727e;
    --vdl-line: #e2e8ee;
    --vdl-amber: #FFCD1C;
}

/* Link thay câu "nên dùng máy tính", cùng chỗ .vbuy-clip__hint */
.vdl-help {
    flex: 1 1 150px; min-width: 0; text-align: left;
    padding: 6px 0; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--vdl-blue);
}
.vdl-help span { text-decoration: underline; text-underline-offset: 3px; }

.vdl-ic { width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -0.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vdl-help, .vdl-btn-sm { display: inline-flex; align-items: center; gap: 6px; }

.vdl-modal {
    position: fixed; inset: 0; z-index: 10000; /* trên nút nổi .bx-design-switch (9999) */
    display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(22, 35, 46, .55);
    font-family: inherit; color: var(--vdl-ink);
}
.vdl-modal[hidden] { display: none; }
.vdl-dialog {
    width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto;
    background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(22, 35, 46, .25);
    text-align: left;
}
.vdl-dialog__h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.vdl-dialog__h h3 { margin: 0; flex: 1; font-size: 17px; font-weight: 800; line-height: 1.3; color: var(--vdl-ink); }
.vdl-x {
    flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
    background: #f0f3f6; color: var(--vdl-muted); font-size: 20px; line-height: 1; cursor: pointer;
}

.vdl-inapp {
    display: flex; gap: 10px; margin: 0 16px 12px; padding: 12px;
    background: #fff8dc; border: 1px solid var(--vdl-amber); border-radius: 10px;
    font-size: 13px; line-height: 1.5;
}
.vdl-inapp > .vdl-ic { color: #b8860b; font-size: 18px; margin-top: 2px; }
.vdl-inapp__t { display: block; margin-bottom: 2px; font-size: 14px; font-weight: 700; }
.vdl-inapp__act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vdl-btn-sm {
    min-height: 40px; padding: 8px 14px; border: 1px solid var(--vdl-blue); border-radius: 8px;
    background: #fff; color: var(--vdl-blue); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.vdl-btn-sm--fill { background: var(--vdl-blue); color: #fff; }

.vdl-tabs { display: flex; gap: 4px; margin: 0 16px; padding: 4px; background: #f0f3f6; border-radius: 10px; }
.vdl-tabs button {
    flex: 1; min-height: 38px; padding: 8px 6px; border: 0; border-radius: 8px; background: none;
    color: var(--vdl-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.vdl-tabs button[aria-selected="true"] { background: #fff; color: var(--vdl-blue); box-shadow: 0 1px 3px rgba(22, 35, 46, .12); }

.vdl-steps { padding: 8px 16px 4px; }
.vdl-steps[hidden] { display: none; }
.vdl-step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 10px 0; font-size: 14px; line-height: 1.55; }
.vdl-step + .vdl-step { border-top: 1px dashed var(--vdl-line); }
.vdl-step b { font-weight: 700; }
.vdl-step__n {
    position: relative; width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center; background: #e8f0f7; color: var(--vdl-blue); font-weight: 800;
}
.vdl-step__n .vdl-ic {
    position: absolute; right: -5px; bottom: -5px; width: 18px; height: 18px; padding: 3px; box-sizing: border-box;
    border-radius: 50%; background: var(--vdl-amber); color: var(--vdl-ink); stroke-width: 2.5;
}
.vdl-foot { padding: 8px 16px 16px; }
.vdl-foot .btn { width: 100%; }
.vdl-foot small { display: block; text-align: center; font-size: 12px; color: var(--vdl-muted); }

.vdl-help:focus-visible, .vdl-x:focus-visible, .vdl-tabs button:focus-visible, .vdl-btn-sm:focus-visible {
    outline: 2px solid var(--vdl-amber); outline-offset: 2px;
}
body.vdl-lock { overflow: hidden; }

@media (max-width: 640px) {
    .vdl-modal { align-items: flex-end; padding: 0; }
    .vdl-dialog { max-width: none; max-height: 90vh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
