/**
 * Navigation Styles
 * Extracted from includes/nav.php for CSP compliance
 */

/* Compact Icon Group */
.nav-icon-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.5rem;
}

.nav-icon-btn, .notification-bell-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.nav-icon-btn:hover, .theme-toggle-btn:hover, .notification-bell-btn:hover {
    background: rgba(255,255,255,0.1);
}

.nav-icon-btn svg, .theme-toggle-btn svg, .notification-bell-btn svg {
    display: block;
}

/* Compact badges */
.nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0a0a0a;
    z-index: 10;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #cf0000 0%, #ff4444 100%);
    color: white;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
}

/* Inbox badge - handles double digits */
.inbox-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    font-size: 10px;
    background: linear-gradient(135deg, #cf0000 0%, #ff4444 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0a0a0a;
    z-index: 10;
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.1);
    margin: 0 0.5rem;
}

/* Notification Dropdown (compact) */
.notification-bell-wrapper {
    position: relative;
}

.notification-bell-btn.has-unread {
    animation: bellShake 2s ease-in-out infinite;
}

@keyframes bellShake {
    0%, 100% { transform: rotate(0); }
    5%, 15% { transform: rotate(10deg); }
    10%, 20% { transform: rotate(-10deg); }
    25% { transform: rotate(0); }
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: -100px;
    width: 340px;
    max-height: 420px;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    z-index: 1002;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.notification-dropdown.active {
    display: flex;
}

.notification-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 108px;
    width: 12px;
    height: 12px;
    background: rgba(20, 20, 20, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.notification-header .notification-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-header .mark-all-read,
.notification-header .clear-all {
    font-size: 0.75rem;
    color: #3b82f6;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s ease;
}

.notification-header .clear-all {
    color: #888;
}

.notification-header .clear-all:hover {
    color: #ef4444;
}

.notification-header .notification-divider {
    color: #444;
    font-size: 0.75rem;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 320px;
}

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
}

.notification-item.pinned {
    border-left: 3px solid #cf0000;
    background: rgba(207, 0, 0, 0.1);
    position: relative;
}

.notification-item.pinned::before {
    content: '📌';
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    font-size: 0.7rem;
    opacity: 0.8;
}

.notification-item.pinned:hover {
    background: rgba(207, 0, 0, 0.15);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.05);
}

.notification-icon.warning {
    background: rgba(207, 0, 0, 0.2);
}

.notification-icon.ban {
    background: rgba(0, 0, 0, 0.4);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.15rem;
}

.notification-empty {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.notification-empty svg {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
    opacity: 0.3;
}

.notification-footer {
    padding: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.notification-footer a {
    color: #888;
    font-size: 0.8rem;
    text-decoration: none;
}

.notification-footer a:hover {
    color: #fff;
}

/* Nav Search Styles */
.nav-search-wrapper {
    position: relative;
}

.nav-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: -100px;
    width: 280px;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    z-index: 1002;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.nav-search-dropdown.active {
    display: flex;
}

.nav-search-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 108px;
    width: 12px;
    height: 12px;
    background: rgba(20, 20, 20, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

.nav-search-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-search-header svg {
    color: #666;
    flex-shrink: 0;
}

.nav-search-header input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
}

.nav-search-header input::placeholder {
    color: #666;
}

.nav-search-results {
    max-height: 300px;
    overflow-y: auto;
}

.nav-search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-search-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-search-item:last-child {
    border-bottom: none;
}

.nav-search-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.nav-search-info {
    flex: 1;
    min-width: 0;
}

.nav-search-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-search-empty,
.nav-search-loading {
    padding: 1.5rem;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

/* Mobile specific adjustments */
.mobile-profile-link .nav-inbox-wrapper {
    margin-right: 0;
    top: 0px; 
}
.mobile-profile-link .nav-badge {
    top: -2px;
    right: -2px;
    border-color: #1a1a1a;
}

/* Nav Link Styles (extracted from inline styles) */
.nav-admin-link {
    color: #ffd700;
    font-size: 0.85rem;
}

.nav-profile-link,
.nav-signin-link {
    font-size: 0.9rem;
}

.nav-logout-btn,
.nav-join-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}
