/*
 * Tên file: Application\public\assets\css\wheel.css
 * Mô tả: Menu vô lăng 1/4 ở góc dưới bên trái (chỉ PC: màn rộng, có chuột). Vị trí các mục tính bằng cos()/sin()
 *        theo --sel (mục đang chọn, số thực để xoay mượt) do wheel.js đặt.
 * Ngày tạo: 2026-11-15
 */
.wheel-nav { display: none; }

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
    .has-wheel .category-bar { display: none; }
    .has-wheel .wheel-nav { display: block; }
}

.wheel-nav {
    --sel: 0;
    --step: 17deg;
    --r: 300px;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 40;
    width: 400px;
    height: 400px;
    pointer-events: none;
    /* Dat san gia tri goc: doi scale khi mo/thu khong lam doi stacking context */
    scale: .5;
    transform-origin: 0 100%;
    transition: scale .4s cubic-bezier(.22, 1, .36, 1);
    font-family: var(--font);
}
.wheel-nav.is-open, .wheel-nav:focus-within { scale: 1; }

/* Nen toi sau vo lang de chu doc duoc tren moi phan trang */
.wheel-nav::before {
    content: "";
    position: absolute;
    left: -400px;
    bottom: -400px;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(10, 13, 18, .9) 58%, rgba(10, 13, 18, .55) 80%, rgba(10, 13, 18, 0));
    opacity: .7;
    transition: opacity .4s;
}
.wheel-nav.is-open::before, .wheel-nav:focus-within::before { opacity: 1; }

.wheel-dial {
    position: absolute;
    left: -230px;
    bottom: -230px;
    width: 460px;
    height: 460px;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
    rotate: calc(var(--sel) * var(--step) * -1);
    filter: drop-shadow(0 0 18px rgba(0, 0, 0, .5));
}
.wheel-nav.is-dragging .wheel-dial { cursor: grabbing; }

.wheel-pointer {
    position: absolute;
    left: calc(cos(45deg) * 236px);
    bottom: calc(sin(45deg) * 236px);
    width: 12px;
    height: 12px;
    translate: -50% 50%;
    rotate: 45deg;
    border-top: 3px solid var(--c-accent, #3d8bff);
    border-right: 3px solid var(--c-accent, #3d8bff);
    filter: drop-shadow(0 0 6px var(--c-accent, #3d8bff));
}

.wheel-items { list-style: none; margin: 0; padding: 0; }
.wheel-item {
    --t: calc(45deg + (var(--sel) - var(--i)) * var(--step));
    position: absolute;
    left: 0;
    bottom: 0;
    translate: calc(cos(var(--t)) * var(--r)) calc(sin(var(--t)) * var(--r) * -1);
    pointer-events: auto;
}
.wheel-item[data-hidden] { visibility: hidden; }
.wheel-link {
    display: block;
    translate: -50% 50%;
    scale: 1;
    padding: 5px 12px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 600;
    color: #c3ccd6;
    background: rgba(13, 17, 23, .7);
    transition: color .25s, background .25s, scale .25s;
}
.wheel-link:hover { color: #fff; text-decoration: none; }
.wheel-link[aria-current="page"] { box-shadow: inset 0 0 0 1px rgba(61, 139, 255, .6); }
.wheel-item.is-selected > .wheel-link {
    scale: 1.45;
    color: #fff;
    background: var(--c-primary, #1f5fd1);
    box-shadow: 0 6px 18px rgba(31, 95, 209, .45);
}

.wheel-sub {
    position: absolute;
    left: calc(100% + 36px);
    top: 50%;
    translate: 0 50%;
    display: none;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.wheel-item.is-selected > .wheel-sub { display: flex; }
.wheel-nav:not(.is-open):not(:focus-within) .wheel-sub { display: none; }
.wheel-sub a {
    display: block;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(13, 17, 23, .85);
    color: #e8edf3;
    font-size: 13px;
    white-space: nowrap;
}
.wheel-sub a:hover { border-color: #fff; color: #fff; text-decoration: none; }

.wheel-hint {
    position: absolute;
    left: 22px;
    bottom: 372px;
    margin: 0;
    font-size: 12px;
    color: #8f9aa7;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .3s;
}
.wheel-nav.is-open .wheel-hint { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .wheel-nav, .wheel-nav::before, .wheel-link { transition: none; }
}
