/* Hướng dẫn tương tác lần đầu (metravel-huong-dan.js). Chỉ dùng token màu của tokens.css.
   Không chặn thao tác: vòng sáng + lớp tối nhẹ có pointer-events:none, nút thật vẫn bấm được. */

.hd-tieu-de { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.hd-nut-help {
    display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px;
    border: 1px solid var(--nk-do-vien); border-radius: 999px;
    background: var(--nk-do-nhat); color: var(--nk-do-nhat-chu);
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.hd-nut-help[hidden] { display: none; }
.hd-nut-help:hover { background: color-mix(in srgb, var(--nk-do-nhat) 85%, var(--nk-do-vien)); }
.hd-nut-help:focus-visible { outline: 3px solid var(--nk-do); outline-offset: 2px; }
.hd-the button:focus-visible { outline: 3px solid var(--mt-gold); outline-offset: 2px; }

/* Vòng sáng quanh phần tử đang giới thiệu (toạ độ fixed do JS tính) */
.hd-vet {
    position: fixed; z-index: 9990; pointer-events: none;
    border-radius: 14px;
    box-shadow: 0 0 0 3px var(--mt-gold), 0 0 0 9999px color-mix(in srgb, var(--mt-text) 38%, transparent);
}
.hd-vet[hidden] { display: none; }

.hd-the {
    position: fixed; z-index: 9995; box-sizing: border-box;
    width: min(340px, calc(100vw - 24px));
    padding: 14px 16px 12px;
    border-radius: 16px;
    background: var(--mt-primary); color: var(--mt-on-primary);
    box-shadow: var(--mt-gold-bar), 0 10px 30px color-mix(in srgb, var(--mt-text) 35%, transparent);
    font-size: 14px; line-height: 1.5;
}
.hd-the[hidden] { display: none; }
.hd-the:focus { outline: none; }
.hd-dem { margin: 0 24px 4px 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--mt-gold-text); }
.hd-chu { margin: 0 0 12px; font-size: 15px; font-weight: 500; }
.hd-hang { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.hd-nut {
    min-height: 40px; padding: 6px 16px; border-radius: 999px; cursor: pointer;
    font: inherit; font-size: 14px; font-weight: 600;
    border: 1.5px solid color-mix(in srgb, var(--mt-on-primary) 55%, transparent);
    background: transparent; color: var(--mt-on-primary);
}
.hd-nut--chinh { background: var(--mt-on-primary); border-color: var(--mt-on-primary); color: var(--mt-primary); }
.hd-dong {
    position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%;
    background: transparent; color: var(--mt-on-primary); font-size: 20px; line-height: 1; cursor: pointer;
}
.hd-dong:hover { background: color-mix(in srgb, var(--mt-on-primary) 15%, transparent); }

/* Lời mời lần đầu: ở GIỮA màn hình, to, có nền tối nhẹ phía sau để khách thấy ngay */
.hd-nen {
    position: fixed; inset: 0; z-index: 9985;
    background: color-mix(in srgb, var(--mt-text) 45%, transparent);
}
.hd-nen[hidden] { display: none; }
.hd-the--moi {
    top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%);
    width: min(440px, calc(100vw - 32px)); padding: 28px 24px 22px; text-align: center;
    border-radius: 20px; z-index: 9996;
}
.hd-bieu-tuong {
    display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 12px;
    border-radius: 50%; background: var(--mt-gold-text); color: var(--mt-primary); font-size: 26px;
}
.hd-chu--moi { margin: 0 0 20px; font-size: 21px; font-weight: 700; line-height: 1.35; }
.hd-hang--moi { justify-content: center; gap: 10px; }
.hd-hang--moi .hd-nut { min-height: 46px; padding: 8px 22px; font-size: 16px; }
@media (prefers-reduced-motion: no-preference) {
    .hd-the--moi { animation: hd-hien .35s ease-out; }
    @keyframes hd-hien { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
}

@media (max-width: 640px) {
    .hd-the { left: 12px; right: 12px; width: auto; }
    .hd-the--moi { left: 50%; right: auto; width: min(440px, calc(100vw - 32px)); }
}
@media (prefers-reduced-motion: no-preference) {
    .hd-vet { transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease; }
}
