/*
 * Tribute Nav — Profile dropdown CSS

 */

/* ── Logged-out link ─────────────────────────────────────────────────────── */
#tribute-nav-loggedout {
    display: inline-flex;
    align-items: center;
}

#tribute-nav-loggedout .tribute-nav-login-link {
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

/* ── Logged-in wrapper ───────────────────────────────────────────────────── */
#tribute-nav-loggedin {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* ── Profile trigger button ─────────────────────────────────────────────── */
#tribute-nav-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
    color: inherit;
    line-height: 1;
}

#tribute-nav-profile-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ── Avatar circle ───────────────────────────────────────────────────────── */
.tribute-nav-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #DD183B;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}

.tribute-nav-avatar.tribute-nav-avatar-lg {
    width: 44px;
    height: 44px;
    font-size: 16px;
}

/* ── Username text ───────────────────────────────────────────────────────── */
.tribute-nav-username {
    font-size: 14px;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Chevron arrow ───────────────────────────────────────────────────────── */
.tribute-nav-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

#tribute-nav-loggedin.open .tribute-nav-arrow {
    transform: rotate(180deg);
}

/* ── Dropdown panel ──────────────────────────────────────────────────────── */
#tribute-nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    z-index: 99999;
    overflow: hidden;
    animation: tributeDropIn 0.18s ease;
}

#tribute-nav-dropdown.open {
    display: block;
}

@keyframes tributeDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Dropdown header (user info) ─────────────────────────────────────────── */
.tribute-nav-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
    background: #fafafa;
}

.tribute-nav-dropdown-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tribute-nav-user-fullname {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tribute-nav-user-email {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.tribute-nav-dropdown-divider {
    border: none;
    border-top: 1px solid #eeeeee;
    margin: 0;
}

/* ── Navigation links ────────────────────────────────────────────────────── */
.tribute-nav-dropdown-links {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.tribute-nav-dropdown-links li {
    margin: 0;
}

.tribute-nav-dropdown-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.tribute-nav-dropdown-links a:hover {
    background: #f5f5f5;
    color: #DD183B;
}

.tribute-nav-dropdown-links a i {
    width: 16px;
    font-size: 13px;
    color: #888;
    flex-shrink: 0;
}

.tribute-nav-dropdown-links a:hover i {
    color: #DD183B;
}

/* ── Dropdown footer (logout) ────────────────────────────────────────────── */
.tribute-nav-dropdown-footer {
    padding: 6px 0;
}

#tribute-nav-logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: #DD183B;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s;
}

#tribute-nav-logout-btn:hover {
    background: #fdecea;
}

#tribute-nav-logout-btn i {
    font-size: 13px;
}

/* ── Change Password Modal ───────────────────────────────────────────────── */
#tribute-change-pw-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

#tribute-change-pw-overlay.active {
    display: flex;
}

#tribute-change-pw-modal {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: tributeModalIn 0.3s ease;
    position: relative;
}

@keyframes tributeModalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tribute-cpw-header {
    background: #DD183B;
    padding: 18px 20px;
    position: relative;
}

.tribute-cpw-header h3 {
    color: #fff;
    margin: 0;
    font-size: 18px;
}

.tribute-cpw-close {
    position: absolute;
    top: 14px; right: 18px;
    font-size: 22px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    opacity: 0.8;
    line-height: 1;
}

.tribute-cpw-close:hover { opacity: 1; }

.tribute-cpw-body {
    padding: 20px;
}

.tribute-cpw-group {
    margin-bottom: 14px;
}

.tribute-cpw-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}

.tribute-cpw-group input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.tribute-cpw-group input:focus {
    border-color: #DD183B;
    box-shadow: 0 0 0 3px rgba(221, 24, 59, 0.1);
}

#tribute-cpw-message {
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
}

#tribute-cpw-message.error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
    display: block;
}

#tribute-cpw-message.success {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #c3e6cb;
    display: block;
}

#tribute-cpw-submit {
    width: 100%;
    padding: 11px;
    background: #DD183B;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

#tribute-cpw-submit:hover { background: #bb1432; }
#tribute-cpw-submit:disabled { background: #ccc; cursor: not-allowed; }

/* ── Mobile responsive ───────────────────────────────────────────────────── */
@media (max-width: 767px) {

    .tribute-nav-username {
        display: none; /* hide name, show only avatar on mobile */
    }

    #tribute-nav-dropdown {
        right: -10px;
        width: 240px;
    }
}