/* =====================================================
   NGUYENTHAIMMO – ACCOUNT DROPDOWN (DESKTOP ONLY)
===================================================== */

/* Nút chung */
.ntm-login-btn,
.ntm-account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 14px;
    border-radius: 999px;
    background: #0d6efd;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ntm-login-btn:hover,
.ntm-account-btn:hover {
    color: #000;
}

/* ===== WRAPPER ===== */
.ntm-account-wrap {
    position: relative;
    display: inline-block;
}

/* Bridge element - tạo vùng vô hình để không bị mất hover */
.ntm-account-wrap::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 12px;
    display: block;
}

/* ===== DROPDOWN ===== */
.ntm-account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    padding: 6px 0;

    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    z-index: 9999;
    pointer-events: none;
}

/* Item */
.ntm-account-dropdown a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.ntm-account-dropdown a:hover {
    background: #f1f3f5;
    color: #d10000;
}

/* Logout nổi bật */
.ntm-account-dropdown a.logout {
    color: #d10000;
    font-weight: 600;
}

/* ===== HOVER HIỆN DROPDOWN ===== */
@media (min-width: 850px) {
    /* Hiện dropdown khi hover vào wrapper (bao gồm cả bridge) */
    .ntm-account-wrap:hover .ntm-account-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Giữ dropdown hiển thị khi hover trực tiếp vào nó */
    .ntm-account-dropdown:hover {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* ===== MOBILE: TẮT DROPDOWN ===== */
@media (max-width: 849px) {
    .ntm-account-dropdown {
        display: none;
    }

    /* Ẩn bridge trên mobile */
    .ntm-account-wrap::after {
        display: none;
    }
}
