/* ─────────────────────────────────────────────────────────────
   Portal profile menu
   Shared by the DubaiWay / SafariDriver / TourGuide / Nanny
   headers. The signed-in profile chip in each of those headers
   used to be a bare link to the profile page, which left the
   portals with no way to sign out. It is now a dropdown that
   carries the profile link plus Logout.
   ───────────────────────────────────────────────────────────── */
.tg-profile-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* The toggle is a <button>, so reset the UA button chrome; the
   portal's own .tg-btn-login / .user-profile styling does the rest. */
.tg-profile-toggle {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.tg-btn-login.tg-profile-toggle {
    /* .tg-btn-login is authored for <a>; keep the anchor padding. */
    padding: 8px 16px;
}

.tg-profile-caret {
    flex: 0 0 auto;
    transition: transform .2s ease;
}

.tg-profile-dropdown.show .tg-profile-caret {
    transform: rotate(180deg);
}

.tg-profile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    z-index: 1200;
    min-width: 200px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}

.tg-profile-dropdown.show .tg-profile-menu {
    display: block;
}

    .tg-profile-menu a,
    .tg-profile-menu button {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 10px 12px;
        border: 0;
        border-radius: 8px;
        background: none;
        font-size: 0.875rem;
        font-weight: 500;
        line-height: 20px;
        color: #1f2937;
        text-align: start;
        text-decoration: none;
        cursor: pointer;
    }

        .tg-profile-menu a:hover,
        .tg-profile-menu a:focus-visible,
        .tg-profile-menu button:hover,
        .tg-profile-menu button:focus-visible {
            background: rgba(0, 0, 0, .05);
            color: #111827;
        }

.tg-profile-menu__sep {
    height: 1px;
    margin: 6px 4px;
    background: rgba(0, 0, 0, .08);
}

.tg-profile-menu__logout {
    color: #ba1a1a !important;
}

    .tg-profile-menu__logout:hover,
    .tg-profile-menu__logout:focus-visible {
        background: rgba(186, 26, 26, .08) !important;
        color: #8f1414 !important;
    }

/* Dark / night theme — the portals flip this attribute on <html>. */
[data-ax-theme="dark"] .tg-profile-menu,
html.ax-night .tg-profile-menu {
    background: var(--dw-surf-m, #1f2937);
    border-color: rgba(255, 255, 255, .12);
}

    [data-ax-theme="dark"] .tg-profile-menu a,
    [data-ax-theme="dark"] .tg-profile-menu button,
    html.ax-night .tg-profile-menu a,
    html.ax-night .tg-profile-menu button {
        color: #e5e7eb;
    }

        [data-ax-theme="dark"] .tg-profile-menu a:hover,
        [data-ax-theme="dark"] .tg-profile-menu button:hover,
        html.ax-night .tg-profile-menu a:hover,
        html.ax-night .tg-profile-menu button:hover {
            background: rgba(255, 255, 255, .08);
            color: #fff;
        }

/* Nanny's chip is a `.user-profile` block rather than a `.tg-btn-login`
   pill, so restore the divider and padding the button reset above wipes. */
.user-profile.tg-profile-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-inline-start: 20px;
    border-inline-start: 1px solid var(--color-border, rgba(0, 0, 0, .1));
}
