/**
 * Public Navigation Styles
 * User menu dropdown for authenticated users
 */

/* Keep actions and brand together on the left (overrides components.css space-between) */
.copo-top-nav-content {
    justify-content: flex-start;
    gap: 16px;
}

/* Forum link (shown only when the forum is on) */
.copo-nav-forum-link {
    align-self: center;
    margin-right: 4px;
    padding: 4px 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.copo-nav-forum-link:hover,
.copo-nav-forum-link:focus-visible {
    text-decoration: underline;
}

/* On a phone the header has no room for another link beside Sign In, Sign Up and the logo;
   the footer carries a Forum link instead. */
@media (max-width: 520px) {
    .copo-nav-forum-link {
        display: none;
    }
}

/* User Menu Container */
.copo-user-menu {
    position: relative;
    display: inline-block;
}

/* User Menu Toggle Button */
.copo-user-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    cursor: pointer;
    background: white;
    color: #3b5998;
    border: 2px solid #3b5998;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.copo-user-menu-toggle:hover {
    background: #3b5998;
    color: white;
}

.copo-user-menu-toggle .copo-icon {
    width: 16px;
    height: 16px;
}

.copo-user-menu-toggle .copo-icon-chevron {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.copo-user-menu-toggle:hover .copo-icon-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.copo-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 8px 0;
}

/* Dropdown Items */
.copo-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    width: 100%;
    text-align: left;
    text-decoration: none;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.copo-dropdown-item:hover {
    background-color: #f5f5f5;
}

.copo-dropdown-item .copo-icon {
    width: 16px;
    height: 16px;
    color: #666;
}

/* Logout Button (special styling) */
.copo-logout-btn {
    color: #d32f2f;
}

.copo-logout-btn:hover {
    background-color: #ffebee;
}

.copo-logout-btn .copo-icon {
    color: #d32f2f;
}

/* Dropdown Divider */
.copo-dropdown-divider {
    margin: 8px 0;
    border: none;
    border-top: 1px solid #eee;
}

/* Hide dropdown by default */
.copo-user-dropdown[style*="display: none"] {
    display: none !important;
}

.copo-user-dropdown[style*="display: block"] {
    display: block !important;
}