/* ── Wrapper ─────────────────────────────────────── */
.ldc-header-icons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ── Header icon badges (LMS / login / account) ──── */
.ldc-lms-link,
.ldc-login-link,
.ldc-account-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #299E70 0%, #1E869B 100%);
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    padding: 0;
    line-height: 1;
    transition: opacity 0.2s ease;
}
.ldc-lms-link:hover,
.ldc-lms-link:focus,
.ldc-login-link:hover,
.ldc-account-icon:hover {
    opacity: 0.82;
    color: #fff;
    text-decoration: none;
}

/* ── Dropdown wrapper ────────────────────────────── */
.ldc-account-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* ── Dropdown panel ──────────────────────────────── */
.ldc-account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    min-width: 165px;
    z-index: 9999;
    overflow: hidden;
}

/* Invisible bridge — fills the 8px gap so hover doesn't break
   when moving the mouse from the icon down to the dropdown panel */
.ldc-account-wrap::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -10px;
    right: -10px;
    height: 12px; /* slightly taller than the 8px gap for safety */
}

/* Desktop: show on hover */
.ldc-account-wrap:hover .ldc-account-dropdown {
    display: block;
}

/* Touch / JS: show when toggled */
.ldc-account-wrap.is-open .ldc-account-dropdown {
    display: block;
}

/* ── Dropdown links ──────────────────────────────── */
.ldc-account-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #3F3A64;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}
.ldc-account-dropdown a:last-child {
    border-bottom: none;
}
.ldc-account-dropdown a:hover {
    background: rgba(41, 158, 112, 0.08);
    text-decoration: none;
    color: #3F3A64;
}
.ldc-account-dropdown a.ldc-logout {
    color: #D9534F;
}
.ldc-account-dropdown a.ldc-logout:hover {
    color: #B8453F;
}
.ldc-account-dropdown a i {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* ── RTL support ─────────────────────────────────── */
[dir="rtl"] .ldc-account-dropdown {
    right: auto;
    left: 0;
}
