/* Profile Components */

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    width: 280px;
    contain: layout;
    margin-right: 0.5rem;
}

.profile-button {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
    gap: 0.5rem;
}

.profile-button:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
}

.profile-button.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.profile-icon {
    color: var(--accent-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.profile-label {
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.profile-button.active .profile-arrow {
    transform: rotate(180deg);
}

/* Profile Dropdown Menu */
.profile-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 32px var(--shadow-color);
    width: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 0, 0);
    transition: opacity 0.2s ease, visibility 0.2s ease;
    max-height: 80vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    will-change: opacity;
    contain: layout style paint;
    margin-top: 0.5rem;
}

.profile-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
}

/* Current Profile Info */
.current-profile-info {
    padding: 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.current-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.current-profile-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.current-profile-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.current-profile-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.4;
    display: none;
}

.current-profile-stats {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Profile Quick Actions */
.profile-quick-actions {
    padding: 0.5rem 0.5rem 0 0.5rem;
    background: var(--bg-primary);
}

.profile-quick-actions .quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: left;
    margin-bottom: 0.5rem;
}

.profile-quick-actions .quick-action-btn:last-child {
    margin-bottom: 0.5rem;
}

.profile-quick-actions .quick-action-btn:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.profile-quick-actions .quick-action-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.profile-quick-actions .quick-action-btn i {
    width: 16px;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

.profile-quick-actions .quick-action-btn:hover i {
    color: var(--accent-color);
}

/* Mobile Responsive */
@media (max-width: 1100px) {
    .profile-dropdown {
        width: 220px;
    }
    
    .profile-button {
        padding: 0.5rem 0.625rem;
        font-size: 0.8125rem;
    }
    
    .profile-label {
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .profile-dropdown {
        width: 100%;
        margin-right: 0;
    }
    
    .profile-button {
        width: 100%;
    }
}
/* 
Subscribed Collections List */
.subscribed-collections-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.subscribed-collection-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
    gap: 0.75rem;
}

.subscribed-collection-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.collection-id-text {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subscribed-collection-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.copy-collection-id-btn,
.select-collection-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-collection-id-btn {
    padding: 0.5rem;
}

.copy-collection-id-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.select-collection-btn {
    font-weight: 500;
}

.select-collection-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.select-collection-btn i {
    font-size: 0.75rem;
}

.empty-collections-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Scrollbar styling for subscribed collections */
.subscribed-collections-list::-webkit-scrollbar {
    width: 6px;
}

.subscribed-collections-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.subscribed-collections-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.subscribed-collections-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}
