/*
 * Trợ giúp tải ảnh trên trang ảnh của giải: popup hướng dẫn, gợi ý nhấn giữ trong lightbox,
 * thông báo Zalo, nút "Cách tải ảnh", dải gợi ý cho khách mới.
 * Chèn qua afterroute vào MỌI layout (DS, bản cũ, layout riêng của giải) nên:
 *  - tự khai màu (layout cũ không có token DS), tiền tố pdl- để không đụng CSS giải;
 *  - font theo trang; z-index trên Fancybox 5 (1050) và nút nổi DS (9999).
 * Khách phổ thông: chữ bước 18px, nút cao >= 48px, 1 hành động chính mỗi màn.
 */
.pdl-root, .pdl-root * { box-sizing: border-box; }
.pdl-root {
    --pdl-blue: #1F5D8C; --pdl-blue-50: #EAF2F9; --pdl-blue-100: #CFE1F0;
    --pdl-ink: #0E1B26; --pdl-ink-7: #2B3A45; --pdl-muted: #5C6E7A; --pdl-line: #E3EAEF; --pdl-soft: #F2F5F7;
    --pdl-amber-50: #FFF8E4; --pdl-amber-200: #FFE285; --pdl-amber: #FFCD1C; --pdl-amber-deep: #FA8F1C;
    --pdl-green: #1E9E5A; --pdl-grad: linear-gradient(116deg, #FFCD1C 0%, #FA8F1C 100%);
    color: var(--pdl-ink); font-size: 16px; line-height: 1.45; text-align: left;
}
.pdl-root button { font-family: inherit; }
.pdl-root b { font-weight: 800; }
.pdl-root :focus-visible { outline: 3px solid rgba(74, 131, 186, .6); outline-offset: 2px; }

/* ---- Popup (sheet đáy trên điện thoại, hộp giữa trên máy tính) ---- */
.pdl-backdrop { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-end; justify-content: center; background: rgba(11, 22, 32, .55); }
.pdl-backdrop[hidden] { display: none; }
.pdl-sheet { width: 100%; max-width: 480px; max-height: 94vh; overflow: auto; display: flex; flex-direction: column; background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(11, 22, 32, .25); }
.pdl-grab { width: 44px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: #CAD5DC; }
.pdl-head { display: flex; align-items: flex-start; gap: 10px; padding: 10px 18px 6px; }
.pdl-head h3 { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.25; color: var(--pdl-ink); }
.pdl-head p { margin: 4px 0 0; font-size: 14px; color: var(--pdl-muted); }
.pdl-x { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--pdl-soft); color: #41525E; font-size: 24px; line-height: 1; cursor: pointer; }
.pdl-dev { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 6px 18px 0; padding: 8px 12px; border-radius: 8px; background: var(--pdl-blue-50); font-size: 15px; }
.pdl-dev b { color: var(--pdl-blue); }
.pdl-dev__alt summary { min-height: 32px; display: flex; align-items: center; list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--pdl-muted); text-decoration: underline; text-underline-offset: 3px; }
.pdl-dev__alt summary::-webkit-details-marker { display: none; }
.pdl-dev__alt button { border: 0; background: none; padding: 6px 2px; color: var(--pdl-blue); font-size: 13px; font-weight: 700; cursor: pointer; }
.pdl-body { padding: 10px 18px 6px; }
.pdl-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pdl-count { font-size: 14px; font-weight: 700; color: var(--pdl-muted); }
.pdl-dots { display: flex; gap: 6px; }
.pdl-dots i { width: 9px; height: 9px; border-radius: 50%; background: #CAD5DC; }
.pdl-dots i.is-on { width: 22px; border-radius: 5px; background: var(--pdl-amber-deep); }
.pdl-fig { width: 46%; max-width: 200px; margin: 0 auto 12px; }
.pdl-fig.is-desk { width: 78%; max-width: 360px; }
.pdl-scene { display: block; width: 100%; height: auto; }
.pdl-row { display: flex; gap: 12px; align-items: flex-start; }
.pdl-no { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--pdl-grad); font-size: 17px; font-weight: 800; color: var(--pdl-ink); }
.pdl-text { font-size: 18px; font-weight: 600; line-height: 1.4; }
.pdl-text b { color: var(--pdl-blue); }
.pdl-note { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--pdl-muted); }
.pdl-help { margin: 10px 18px 0; font-size: 14px; text-align: center; color: var(--pdl-muted); }
.pdl-help a { font-weight: 700; color: var(--pdl-blue); }
.pdl-foot { position: sticky; bottom: 0; display: flex; gap: 10px; margin-top: 12px; padding: 12px 18px 18px; background: #fff; border-top: 1px solid var(--pdl-line); }
.pdl-btn { flex: 1; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 4px; cursor: pointer; font-size: 17px; font-weight: 800; text-decoration: none; }
.pdl-btn--main { border: 0; background: var(--pdl-grad); color: var(--pdl-ink); box-shadow: 0 2px 8px rgba(250, 143, 28, .22); }
.pdl-btn--ghost { flex: 0 0 auto; padding: 0 18px; border: 2px solid #CAD5DC; background: #fff; color: var(--pdl-ink-7); }
.pdl-btn svg { width: 20px; height: 20px; }
@media (min-width: 761px) {
    .pdl-backdrop { align-items: center; padding: 16px; }
    .pdl-sheet { max-width: 520px; border-radius: 14px; }
    .pdl-grab { display: none; }
}

/* Chuyển động minh hoạ */
.pdl-hand { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
.pdl-ripple { fill: none; stroke: #FA8F1C; stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: pdl-ripple 1.6s ease-out infinite; }
@keyframes pdl-ripple { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.pdl-hold-ring { animation: pdl-hold 1.8s linear infinite; }
@keyframes pdl-hold { 0% { stroke-dashoffset: 100; } 60%, 100% { stroke-dashoffset: 0; } }

/* ---- Gợi ý nhấn giữ trong lightbox (điện thoại) ---- */
.pdl-hint { position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 100001; max-width: 480px; margin: 0 auto; padding: 14px 14px 12px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.pdl-hint__top { display: flex; gap: 12px; align-items: flex-start; }
.pdl-hint__ic { flex: 0 0 56px; }
.pdl-hint__ic svg { display: block; width: 56px; height: 56px; }
.pdl-hint__txt { flex: 1; font-size: 17px; font-weight: 600; line-height: 1.45; }
.pdl-hint__txt b { color: var(--pdl-blue); }
.pdl-hint__x { flex: 0 0 auto; width: 40px; height: 40px; margin: -6px -6px 0 0; border: 0; border-radius: 50%; background: var(--pdl-soft); font-size: 22px; color: #41525E; cursor: pointer; }
.pdl-hint__act { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pdl-hint__more { min-height: 40px; border: 0; background: none; cursor: pointer; font-size: 15px; font-weight: 700; color: var(--pdl-blue); text-decoration: underline; text-underline-offset: 3px; }
.pdl-press { position: fixed; left: 50%; top: 42%; z-index: 100001; width: 76px; height: 76px; margin: -38px 0 0 -38px; pointer-events: none; }
.pdl-press circle { fill: rgba(255, 205, 28, .18); stroke: #FFCD1C; stroke-width: 4; }
.pdl-press .pdl-hold-ring { fill: none; }

/* ---- Thông báo Zalo ---- */
.pdl-zalo { margin: 10px; padding: 14px; border: 2px solid var(--pdl-amber); border-radius: 10px; background: var(--pdl-amber-50); }
.pdl-zalo__t { display: flex; gap: 8px; align-items: center; font-size: 18px; font-weight: 800; line-height: 1.3; }
.pdl-zalo__t svg { flex: 0 0 auto; width: 24px; height: 24px; stroke: #B8860B; }
.pdl-zalo__b { margin: 6px 0 10px; font-size: 15px; line-height: 1.5; color: var(--pdl-ink-7); }
.pdl-zalo__steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pdl-zalo__steps li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: #fff; font-size: 16px; line-height: 1.4; }
.pdl-zalo__steps b { color: var(--pdl-blue); }
.pdl-zalo__steps .pdl-no { width: 30px; height: 30px; font-size: 15px; }
.pdl-zalo__or { margin: 12px 0 8px; font-size: 14px; color: #41525E; }
.pdl-zalo__copy { display: flex; gap: 8px; }
.pdl-zalo__url { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 10px; overflow: hidden; border: 1px solid #CAD5DC; border-radius: 4px; background: #fff; font-size: 13px; color: #41525E; white-space: nowrap; text-overflow: ellipsis; }
.pdl-copybtn { flex: 0 0 auto; min-height: 48px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border: 0; border-radius: 4px; background: var(--pdl-blue); color: #fff; cursor: pointer; font-size: 15px; font-weight: 800; }
.pdl-copybtn.is-done { background: var(--pdl-green); }
.pdl-zalo--float { position: fixed; left: 8px; right: 8px; top: 8px; z-index: 100001; max-width: 480px; margin: 0 auto; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }

/* ---- Nút "Cách tải ảnh" + dải khách mới ---- */
.pdl-fab { position: fixed; left: 14px; bottom: 18px; z-index: 9990; min-height: 48px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: var(--pdl-blue); color: #fff; box-shadow: 0 6px 16px rgba(15, 47, 73, .25); cursor: pointer; font-size: 15px; font-weight: 800; }
.pdl-fab--mini { width: 44px; min-height: 44px; justify-content: center; padding: 0; opacity: .88; }
.pdl-first { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 10px 12px; border: 1px solid var(--pdl-blue-100); border-radius: 8px; background: var(--pdl-blue-50); font-size: 14px; color: #18272F; }
.pdl-first a { display: block; margin-top: 2px; font-weight: 800; color: var(--pdl-blue); }
.pdl-first__x { margin-left: auto; width: 36px; height: 36px; border: 0; background: none; cursor: pointer; font-size: 20px; color: var(--pdl-muted); }
.pdl-ic { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pdl-first .pdl-ic { width: 26px; height: 26px; stroke: var(--pdl-blue); }

@media (prefers-reduced-motion: reduce) {
    .pdl-ripple, .pdl-hold-ring { animation: none; }
    .pdl-hold-ring { stroke-dashoffset: 0; }
}
